Class NullHibernateStats
- java.lang.Object
-
- net.sf.ehcache.hibernate.management.impl.NullHibernateStats
-
- All Implemented Interfaces:
javax.management.NotificationBroadcaster,javax.management.NotificationEmitter,HibernateStats
public final class NullHibernateStats extends java.lang.Object implements HibernateStats
Implementation ofHibernateStatsthat does nothing- Author:
- Abhishek Sanoujam
-
-
Field Summary
Fields Modifier and Type Field Description static HibernateStatsINSTANCESingleton instance.-
Fields inherited from interface net.sf.ehcache.hibernate.management.api.HibernateStats
CACHE_ENABLED, CACHE_FLUSHED, CACHE_REGION_CHANGED, CACHE_REGION_FLUSHED, CACHE_STATISTICS_ENABLED, CACHE_STATISTICS_RESET
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)voidclearStats()Clears statistics, resets all counters to zerovoiddisableStats()Disables statistics collectionvoidenableStats()Enables statistics collectionjavax.management.openmbean.TabularDatagetCacheRegionStats()ReturnsTabularDataof cache region statslonggetCloseStatementCount()Returns the count of close statementsjavax.management.openmbean.TabularDatagetCollectionStats()ReturnsTabularDataof collection statslonggetConnectCount()Return connect countslonggetDBSQLExecutionSample()Not supported right nowjavax.management.openmbean.TabularDatagetEntityStats()ReturnsTabularDataof entity statslonggetFlushCount()Returns flush countjavax.management.MBeanNotificationInfo[]getNotificationInfo()longgetOptimisticFailureCount()Returns Optimistic failure countlonggetPrepareStatementCount()Returns prepare statement countlonggetQueryExecutionCount()Returns the query execution count.doublegetQueryExecutionRate()Returns rate of HQL query executed in the DBlonggetQueryExecutionSample()Returns last count sample of HQL's getting executed in the DB.javax.management.openmbean.TabularDatagetQueryStats()ReturnsTabularDataof query statslonggetSessionCloseCount()Returns session close countlonggetSessionOpenCount()Returns session open countlonggetSuccessfulTransactionCount()Returns successful transaction countlonggetTransactionCount()Returns transaction countbooleanisStatisticsEnabled()Returns true if statistics collection is enabled otherwise falsevoidremoveNotificationListener(javax.management.NotificationListener listener)voidremoveNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)voidsetStatisticsEnabled(boolean flag)Enable/Disable statistics collection
-
-
-
Field Detail
-
INSTANCE
public static final HibernateStats INSTANCE
Singleton instance.
-
-
Method Detail
-
clearStats
public void clearStats()
Clears statistics, resets all counters to zero- Specified by:
clearStatsin interfaceHibernateStats- See Also:
HibernateStats.clearStats()
-
disableStats
public void disableStats()
Disables statistics collection- Specified by:
disableStatsin interfaceHibernateStats- See Also:
HibernateStats.disableStats()
-
enableStats
public void enableStats()
Enables statistics collection- Specified by:
enableStatsin interfaceHibernateStats- See Also:
HibernateStats.enableStats()
-
getCloseStatementCount
public long getCloseStatementCount()
Returns the count of close statements- Specified by:
getCloseStatementCountin interfaceHibernateStats- Returns:
- Returns the count of close statementss
- See Also:
HibernateStats.getCloseStatementCount()
-
getCollectionStats
public javax.management.openmbean.TabularData getCollectionStats()
ReturnsTabularDataof collection stats- Specified by:
getCollectionStatsin interfaceHibernateStats- Returns:
- Returns
TabularDataof collection stats - See Also:
HibernateStats.getCollectionStats()
-
getConnectCount
public long getConnectCount()
Return connect counts- Specified by:
getConnectCountin interfaceHibernateStats- Returns:
- Return connect counts
- See Also:
HibernateStats.getConnectCount()
-
getDBSQLExecutionSample
public long getDBSQLExecutionSample()
Not supported right now
-
getEntityStats
public javax.management.openmbean.TabularData getEntityStats()
ReturnsTabularDataof entity stats- Specified by:
getEntityStatsin interfaceHibernateStats- Returns:
- Returns
TabularDataof entity stats - See Also:
HibernateStats.getEntityStats()
-
getFlushCount
public long getFlushCount()
Returns flush count- Specified by:
getFlushCountin interfaceHibernateStats- Returns:
- Returns flush count
- See Also:
HibernateStats.getFlushCount()
-
getOptimisticFailureCount
public long getOptimisticFailureCount()
Returns Optimistic failure count- Specified by:
getOptimisticFailureCountin interfaceHibernateStats- Returns:
- Returns Optimistic failure count
- See Also:
HibernateStats.getOptimisticFailureCount()
-
getPrepareStatementCount
public long getPrepareStatementCount()
Returns prepare statement count- Specified by:
getPrepareStatementCountin interfaceHibernateStats- Returns:
- Returns prepare statement count
- See Also:
HibernateStats.getPrepareStatementCount()
-
getQueryExecutionCount
public long getQueryExecutionCount()
Returns the query execution count. This includes only HQL's- Specified by:
getQueryExecutionCountin interfaceHibernateStats- Returns:
- Returns the query execution count. This includes only HQL's
- See Also:
HibernateStats.getQueryExecutionCount()
-
getQueryExecutionRate
public double getQueryExecutionRate()
Returns rate of HQL query executed in the DB- Specified by:
getQueryExecutionRatein interfaceHibernateStats- Returns:
- Returns rate of HQL query executed in the DB
- See Also:
HibernateStats.getQueryExecutionRate()
-
getQueryExecutionSample
public long getQueryExecutionSample()
Returns last count sample of HQL's getting executed in the DB.- Specified by:
getQueryExecutionSamplein interfaceHibernateStats- Returns:
- Returns last count sample of HQL's getting executed in the DB.
- See Also:
HibernateStats.getQueryExecutionSample()
-
getQueryStats
public javax.management.openmbean.TabularData getQueryStats()
ReturnsTabularDataof query stats- Specified by:
getQueryStatsin interfaceHibernateStats- Returns:
- Returns
TabularDataof query stats - See Also:
HibernateStats.getQueryStats()
-
getSessionCloseCount
public long getSessionCloseCount()
Returns session close count- Specified by:
getSessionCloseCountin interfaceHibernateStats- Returns:
- Returns session close count
- See Also:
HibernateStats.getSessionCloseCount()
-
getSessionOpenCount
public long getSessionOpenCount()
Returns session open count- Specified by:
getSessionOpenCountin interfaceHibernateStats- Returns:
- Returns session open count
- See Also:
HibernateStats.getSessionOpenCount()
-
getSuccessfulTransactionCount
public long getSuccessfulTransactionCount()
Returns successful transaction count- Specified by:
getSuccessfulTransactionCountin interfaceHibernateStats- Returns:
- Returns successful transaction count
- See Also:
HibernateStats.getSuccessfulTransactionCount()
-
getTransactionCount
public long getTransactionCount()
Returns transaction count- Specified by:
getTransactionCountin interfaceHibernateStats- Returns:
- Returns transaction count
- See Also:
HibernateStats.getTransactionCount()
-
isStatisticsEnabled
public boolean isStatisticsEnabled()
Returns true if statistics collection is enabled otherwise false- Specified by:
isStatisticsEnabledin interfaceHibernateStats- Returns:
- Returns true if statistics collection is enabled otherwise false
- See Also:
HibernateStats.isStatisticsEnabled()
-
setStatisticsEnabled
public void setStatisticsEnabled(boolean flag)
Enable/Disable statistics collection- Specified by:
setStatisticsEnabledin interfaceHibernateStats- See Also:
HibernateStats.setStatisticsEnabled(boolean)
-
getCacheRegionStats
public javax.management.openmbean.TabularData getCacheRegionStats()
Description copied from interface:HibernateStatsReturnsTabularDataof cache region stats- Specified by:
getCacheRegionStatsin interfaceHibernateStats- Returns:
- Returns
TabularDataof cache region stats - See Also:
HibernateStats.getCacheRegionStats()
-
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.ListenerNotFoundException- Specified by:
removeNotificationListenerin interfacejavax.management.NotificationEmitter- Throws:
javax.management.ListenerNotFoundException- See Also:
NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
-
addNotificationListener
public void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws java.lang.IllegalArgumentException- Specified by:
addNotificationListenerin interfacejavax.management.NotificationBroadcaster- Throws:
java.lang.IllegalArgumentException- See Also:
NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
-
getNotificationInfo
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
- Specified by:
getNotificationInfoin interfacejavax.management.NotificationBroadcaster- See Also:
NotificationBroadcaster.getNotificationInfo()
-
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException- Specified by:
removeNotificationListenerin interfacejavax.management.NotificationBroadcaster- Throws:
javax.management.ListenerNotFoundException- See Also:
NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener)
-
-