ehcache

net.sf.ehcache.hibernate.management.impl
Class NullHibernateStats

java.lang.Object
  extended by net.sf.ehcache.hibernate.management.impl.NullHibernateStats
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, HibernateStats

public final class NullHibernateStats
extends Object
implements HibernateStats

Implementation of HibernateStats that does nothing

Author:
Abhishek Sanoujam

Field Summary
static HibernateStats INSTANCE
          Singleton 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
 void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
           
 void clearStats()
          Clears statistics, resets all counters to zero
 void disableStats()
          Disables statistics collection
 void enableStats()
          Enables statistics collection
 TabularData getCacheRegionStats()
          Returns TabularData of cache region stats
 long getCloseStatementCount()
          Returns the count of close statements
 TabularData getCollectionStats()
          Returns TabularData of collection stats
 long getConnectCount()
          Return connect counts
 long getDBSQLExecutionSample()
          Not supported right now
 TabularData getEntityStats()
          Returns TabularData of entity stats
 long getFlushCount()
          Returns flush count
 MBeanNotificationInfo[] getNotificationInfo()
           
 long getOptimisticFailureCount()
          Returns Optimistic failure count
 long getPrepareStatementCount()
          Returns prepare statement count
 long getQueryExecutionCount()
          Returns the query execution count.
 double getQueryExecutionRate()
          Returns rate of HQL query executed in the DB
 long getQueryExecutionSample()
          Returns last count sample of HQL's getting executed in the DB.
 TabularData getQueryStats()
          Returns TabularData of query stats
 long getSessionCloseCount()
          Returns session close count
 long getSessionOpenCount()
          Returns session open count
 long getSuccessfulTransactionCount()
          Returns successful transaction count
 long getTransactionCount()
          Returns transaction count
 boolean isStatisticsEnabled()
          Returns true if statistics collection is enabled otherwise false
 void removeNotificationListener(NotificationListener listener)
           
 void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)
           
 void setStatisticsEnabled(boolean flag)
          Enable/Disable statistics collection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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:
clearStats in interface HibernateStats
See Also:
HibernateStats.clearStats()

disableStats

public void disableStats()
Disables statistics collection

Specified by:
disableStats in interface HibernateStats
See Also:
HibernateStats.disableStats()

enableStats

public void enableStats()
Enables statistics collection

Specified by:
enableStats in interface HibernateStats
See Also:
HibernateStats.enableStats()

getCloseStatementCount

public long getCloseStatementCount()
Returns the count of close statements

Specified by:
getCloseStatementCount in interface HibernateStats
Returns:
Returns the count of close statementss
See Also:
HibernateStats.getCloseStatementCount()

getCollectionStats

public TabularData getCollectionStats()
Returns TabularData of collection stats

Specified by:
getCollectionStats in interface HibernateStats
Returns:
Returns TabularData of collection stats
See Also:
HibernateStats.getCollectionStats()

getConnectCount

public long getConnectCount()
Return connect counts

Specified by:
getConnectCount in interface HibernateStats
Returns:
Return connect counts
See Also:
HibernateStats.getConnectCount()

getDBSQLExecutionSample

public long getDBSQLExecutionSample()
Not supported right now


getEntityStats

public TabularData getEntityStats()
Returns TabularData of entity stats

Specified by:
getEntityStats in interface HibernateStats
Returns:
Returns TabularData of entity stats
See Also:
HibernateStats.getEntityStats()

getFlushCount

public long getFlushCount()
Returns flush count

Specified by:
getFlushCount in interface HibernateStats
Returns:
Returns flush count
See Also:
HibernateStats.getFlushCount()

getOptimisticFailureCount

public long getOptimisticFailureCount()
Returns Optimistic failure count

Specified by:
getOptimisticFailureCount in interface HibernateStats
Returns:
Returns Optimistic failure count
See Also:
HibernateStats.getOptimisticFailureCount()

getPrepareStatementCount

public long getPrepareStatementCount()
Returns prepare statement count

Specified by:
getPrepareStatementCount in interface HibernateStats
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:
getQueryExecutionCount in interface HibernateStats
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:
getQueryExecutionRate in interface HibernateStats
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:
getQueryExecutionSample in interface HibernateStats
Returns:
Returns last count sample of HQL's getting executed in the DB.
See Also:
HibernateStats.getQueryExecutionSample()

getQueryStats

public TabularData getQueryStats()
Returns TabularData of query stats

Specified by:
getQueryStats in interface HibernateStats
Returns:
Returns TabularData of query stats
See Also:
HibernateStats.getQueryStats()

getSessionCloseCount

public long getSessionCloseCount()
Returns session close count

Specified by:
getSessionCloseCount in interface HibernateStats
Returns:
Returns session close count
See Also:
HibernateStats.getSessionCloseCount()

getSessionOpenCount

public long getSessionOpenCount()
Returns session open count

Specified by:
getSessionOpenCount in interface HibernateStats
Returns:
Returns session open count
See Also:
HibernateStats.getSessionOpenCount()

getSuccessfulTransactionCount

public long getSuccessfulTransactionCount()
Returns successful transaction count

Specified by:
getSuccessfulTransactionCount in interface HibernateStats
Returns:
Returns successful transaction count
See Also:
HibernateStats.getSuccessfulTransactionCount()

getTransactionCount

public long getTransactionCount()
Returns transaction count

Specified by:
getTransactionCount in interface HibernateStats
Returns:
Returns transaction count
See Also:
HibernateStats.getTransactionCount()

isStatisticsEnabled

public boolean isStatisticsEnabled()
Returns true if statistics collection is enabled otherwise false

Specified by:
isStatisticsEnabled in interface HibernateStats
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:
setStatisticsEnabled in interface HibernateStats
See Also:
HibernateStats.setStatisticsEnabled(boolean)

getCacheRegionStats

public TabularData getCacheRegionStats()
Description copied from interface: HibernateStats
Returns TabularData of cache region stats

Specified by:
getCacheRegionStats in interface HibernateStats
Returns:
Returns TabularData of cache region stats
See Also:
HibernateStats.getCacheRegionStats()

removeNotificationListener

public void removeNotificationListener(NotificationListener listener,
                                       NotificationFilter filter,
                                       Object handback)
                                throws ListenerNotFoundException
Specified by:
removeNotificationListener in interface NotificationEmitter
Throws:
ListenerNotFoundException
See Also:
NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

addNotificationListener

public void addNotificationListener(NotificationListener listener,
                                    NotificationFilter filter,
                                    Object handback)
                             throws IllegalArgumentException
Specified by:
addNotificationListener in interface NotificationBroadcaster
Throws:
IllegalArgumentException
See Also:
NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)

getNotificationInfo

public MBeanNotificationInfo[] getNotificationInfo()
Specified by:
getNotificationInfo in interface NotificationBroadcaster
See Also:
NotificationBroadcaster.getNotificationInfo()

removeNotificationListener

public void removeNotificationListener(NotificationListener listener)
                                throws ListenerNotFoundException
Specified by:
removeNotificationListener in interface NotificationBroadcaster
Throws:
ListenerNotFoundException
See Also:
NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener)

ehcache

Copyright 2001-2015, Terracotta, Inc.