Java 类org.hibernate.stat.CollectionStatistics 实例源码

项目:lams    文件:ConcurrentStatisticsImpl.java   
/**
 * Get collection statistics per role
 *
 * @param role collection role
 *
 * @return CollectionStatistics
 */
public CollectionStatistics getCollectionStatistics(String role) {
    ConcurrentCollectionStatisticsImpl cs = (ConcurrentCollectionStatisticsImpl) collectionStatistics.get( role );
    if ( cs == null ) {
        cs = new ConcurrentCollectionStatisticsImpl( role );
        ConcurrentCollectionStatisticsImpl previous;
        if ( ( previous = (ConcurrentCollectionStatisticsImpl) collectionStatistics.putIfAbsent(
                role, cs
        ) ) != null ) {
            cs = previous;
        }
    }
    return cs;
}
项目:jipijapa    文件:HibernateCollectionStatistics.java   
private CollectionStatistics getStatistics(final EntityManagerFactory entityManagerFactory, String collectionName) {
    HibernateEntityManagerFactory entityManagerFactoryImpl = (HibernateEntityManagerFactory) entityManagerFactory;
    SessionFactory sessionFactory = entityManagerFactoryImpl.getSessionFactory();
    if (sessionFactory != null) {
        return sessionFactory.getStatistics().getCollectionStatistics(collectionName);
    }
    return null;
}
项目:jipijapa    文件:HibernateCollectionStatistics.java   
private CollectionStatistics getStatistics(final EntityManagerFactory entityManagerFactory, String collectionName) {
    HibernateEntityManagerFactory entityManagerFactoryImpl = (HibernateEntityManagerFactory) entityManagerFactory;
    SessionFactory sessionFactory = entityManagerFactoryImpl.getSessionFactory();
    if (sessionFactory != null) {
        return sessionFactory.getStatistics().getCollectionStatistics(collectionName);
    }
    return null;
}
项目:lemon    文件:StatisticsWrapper.java   
public CollectionStatistics getCollectionStatistics(String role) {
    return null;
}
项目:cacheonix-core    文件:StatisticsService.java   
/**
 * @see StatisticsServiceMBean#getCollectionStatistics(java.lang.String)
 */
public CollectionStatistics getCollectionStatistics(String role) {
    return stats.getCollectionStatistics(role);
}
项目:HibernateStatistics    文件:DelegatingStatisticsService.java   
public CollectionStatistics getCollectionStatistics(String arg0) {
    return delegate.getCollectionStatistics( arg0 );
}
项目:jipijapa    文件:HibernateCollectionStatistics.java   
@Override
public Object invoke(Object... args) {
    CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
    return Long.valueOf(statistics != null ? statistics.getUpdateCount() : 0);
}
项目:jipijapa    文件:HibernateCollectionStatistics.java   
@Override
public Object invoke(Object... args) {
    CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
    return Long.valueOf(statistics != null ? statistics.getRemoveCount() : 0);
}
项目:jipijapa    文件:HibernateCollectionStatistics.java   
@Override
public Object invoke(Object... args) {
    CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
    return Long.valueOf(statistics != null ? statistics.getRemoveCount() : 0);
}
项目:jipijapa    文件:HibernateCollectionStatistics.java   
@Override
public Object invoke(Object... args) {
    CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
    return Long.valueOf(statistics != null ? statistics.getLoadCount() : 0);
}
项目:jipijapa    文件:HibernateCollectionStatistics.java   
@Override
public Object invoke(Object... args) {
    CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
    return Long.valueOf(statistics != null ? statistics.getFetchCount() : 0);
}
项目:jipijapa    文件:HibernateCollectionStatistics.java   
@Override
public Object invoke(Object... args) {
    CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
    return Long.valueOf(statistics != null ? statistics.getUpdateCount() : 0);
}
项目:jipijapa    文件:HibernateCollectionStatistics.java   
@Override
public Object invoke(Object... args) {
    CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
    return Long.valueOf(statistics != null ? statistics.getRemoveCount() : 0);
}
项目:jipijapa    文件:HibernateCollectionStatistics.java   
@Override
public Object invoke(Object... args) {
    CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
    return Long.valueOf(statistics != null ? statistics.getRemoveCount() : 0);
}
项目:jipijapa    文件:HibernateCollectionStatistics.java   
@Override
public Object invoke(Object... args) {
    CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
    return Long.valueOf(statistics != null ? statistics.getLoadCount() : 0);
}
项目:jipijapa    文件:HibernateCollectionStatistics.java   
@Override
public Object invoke(Object... args) {
    CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args));
    return Long.valueOf(statistics != null ? statistics.getFetchCount() : 0);
}