public class HibernateStatsImpl extends BaseEmitterBean implements HibernateStats
HibernateStats
Modifier and Type | Field and Description |
---|---|
private static double |
MILLIS_PER_SECOND |
private static javax.management.MBeanNotificationInfo |
NOTIFICATION_INFO |
private org.hibernate.SessionFactory |
sessionFactory |
emitter, sequenceNumber
CACHE_ENABLED, CACHE_FLUSHED, CACHE_REGION_CHANGED, CACHE_REGION_FLUSHED, CACHE_STATISTICS_ENABLED, CACHE_STATISTICS_RESET
Constructor and Description |
---|
HibernateStatsImpl(org.hibernate.SessionFactory sessionFactory)
Constructor accepting the backing
SessionFactory |
Modifier and Type | Method and Description |
---|---|
void |
clearStats()
Clears statistics, resets all counters to zero
|
void |
disableStats()
Disables statistics collection
|
protected void |
doDispose()
Dispose callback of subclasses
|
void |
enableStats()
Enables statistics collection
|
javax.management.openmbean.TabularData |
getCacheRegionStats()
Returns
TabularData of cache region stats |
long |
getCloseStatementCount()
Returns the count of close statements
|
javax.management.openmbean.TabularData |
getCollectionStats()
Returns
TabularData of collection stats |
long |
getConnectCount()
Return connect counts
|
long |
getDBSQLExecutionSample()
Not supported right now
|
javax.management.openmbean.TabularData |
getEntityStats()
Returns
TabularData of entity stats |
long |
getFlushCount()
Returns flush count
|
javax.management.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.
|
javax.management.openmbean.TabularData |
getQueryStats()
Returns
TabularData of query stats |
long |
getSessionCloseCount()
Returns session close count
|
long |
getSessionOpenCount()
Returns session open count
|
private org.hibernate.stat.Statistics |
getStatistics() |
long |
getSuccessfulTransactionCount()
Returns successful transaction count
|
long |
getTransactionCount()
Returns transaction count
|
boolean |
isStatisticsEnabled()
Returns true if statistics collection is enabled otherwise false
|
void |
setStatisticsEnabled(boolean flag)
Enable/Disable statistics collection
|
addNotificationListener, dispose, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
private static final double MILLIS_PER_SECOND
private static final javax.management.MBeanNotificationInfo NOTIFICATION_INFO
private final org.hibernate.SessionFactory sessionFactory
public HibernateStatsImpl(org.hibernate.SessionFactory sessionFactory) throws javax.management.NotCompliantMBeanException
SessionFactory
sessionFactory
- javax.management.NotCompliantMBeanException
private org.hibernate.stat.Statistics getStatistics()
public void clearStats()
clearStats
in interface HibernateStats
HibernateStats.clearStats()
public void disableStats()
disableStats
in interface HibernateStats
HibernateStats.disableStats()
public void enableStats()
enableStats
in interface HibernateStats
HibernateStats.enableStats()
public long getCloseStatementCount()
getCloseStatementCount
in interface HibernateStats
HibernateStats.getCloseStatementCount()
public long getConnectCount()
getConnectCount
in interface HibernateStats
HibernateStats.getConnectCount()
public long getDBSQLExecutionSample()
public long getFlushCount()
getFlushCount
in interface HibernateStats
HibernateStats.getFlushCount()
public long getOptimisticFailureCount()
getOptimisticFailureCount
in interface HibernateStats
HibernateStats.getOptimisticFailureCount()
public long getPrepareStatementCount()
getPrepareStatementCount
in interface HibernateStats
HibernateStats.getPrepareStatementCount()
public long getQueryExecutionCount()
getQueryExecutionCount
in interface HibernateStats
HibernateStats.getQueryExecutionCount()
public double getQueryExecutionRate()
getQueryExecutionRate
in interface HibernateStats
HibernateStats.getQueryExecutionRate()
public long getQueryExecutionSample()
getQueryExecutionSample
in interface HibernateStats
HibernateStats.getQueryExecutionSample()
public long getSessionCloseCount()
getSessionCloseCount
in interface HibernateStats
HibernateStats.getSessionCloseCount()
public long getSessionOpenCount()
getSessionOpenCount
in interface HibernateStats
HibernateStats.getSessionOpenCount()
public long getSuccessfulTransactionCount()
getSuccessfulTransactionCount
in interface HibernateStats
HibernateStats.getSuccessfulTransactionCount()
public long getTransactionCount()
getTransactionCount
in interface HibernateStats
HibernateStats.getTransactionCount()
public boolean isStatisticsEnabled()
isStatisticsEnabled
in interface HibernateStats
HibernateStats.isStatisticsEnabled()
public void setStatisticsEnabled(boolean flag)
setStatisticsEnabled
in interface HibernateStats
HibernateStats.setStatisticsEnabled(boolean)
public javax.management.openmbean.TabularData getEntityStats()
TabularData
of entity statsgetEntityStats
in interface HibernateStats
TabularData
of entity statsHibernateStats.getEntityStats()
public javax.management.openmbean.TabularData getCollectionStats()
TabularData
of collection statsgetCollectionStats
in interface HibernateStats
TabularData
of collection statsHibernateStats.getCollectionStats()
public javax.management.openmbean.TabularData getQueryStats()
TabularData
of query statsgetQueryStats
in interface HibernateStats
TabularData
of query statsHibernateStats.getQueryStats()
public javax.management.openmbean.TabularData getCacheRegionStats()
TabularData
of cache region statsgetCacheRegionStats
in interface HibernateStats
TabularData
of cache region statsprotected void doDispose()
doDispose
in class BaseEmitterBean
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface javax.management.NotificationBroadcaster
getNotificationInfo
in class BaseEmitterBean
BaseEmitterBean.getNotificationInfo()