/** * 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; }
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; }
public CollectionStatistics getCollectionStatistics(String role) { return null; }
/** * @see StatisticsServiceMBean#getCollectionStatistics(java.lang.String) */ public CollectionStatistics getCollectionStatistics(String role) { return stats.getCollectionStatistics(role); }
public CollectionStatistics getCollectionStatistics(String arg0) { return delegate.getCollectionStatistics( arg0 ); }
@Override public Object invoke(Object... args) { CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args)); return Long.valueOf(statistics != null ? statistics.getUpdateCount() : 0); }
@Override public Object invoke(Object... args) { CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args)); return Long.valueOf(statistics != null ? statistics.getRemoveCount() : 0); }
@Override public Object invoke(Object... args) { CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args)); return Long.valueOf(statistics != null ? statistics.getLoadCount() : 0); }
@Override public Object invoke(Object... args) { CollectionStatistics statistics = getStatistics(getEntityManagerFactory(args), getStatisticName(args)); return Long.valueOf(statistics != null ? statistics.getFetchCount() : 0); }