Top Description Fields Constructors Methods
net.sf.ehcache.hibernate.management.impl

public Class HibernateStatsImpl

extends BaseEmitterBean
implements HibernateStats
Class Inheritance
All Implemented Interfaces
net.sf.ehcache.hibernate.management.api.HibernateStats, javax.management.NotificationEmitter, javax.management.NotificationBroadcaster
Imports
java.util.ArrayList, .List, javax.management.MBeanNotificationInfo, .NotCompliantMBeanException, .Notification, javax.management.openmbean.CompositeData, .TabularData, net.sf.ehcache.hibernate.management.api.HibernateStats, org.hibernate.SessionFactory, org.hibernate.stat.Statistics

Implementation of HibernateStats

Author
Abhishek Sanoujam

Field Summary

Modifier and TypeField and Description
private static final double
private static final MBeanNotificationInfo
private final SessionFactory
Inherited from net.sf.ehcache.hibernate.management.impl.BaseEmitterBean:
emittersequenceNumber

Constructor Summary

AccessConstructor and Description
public
HibernateStatsImpl(SessionFactory sessionFactory)

Constructor accepting the backing SessionFactory

Method Summary

Modifier and TypeMethod and Description
public void
clearStats()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.clearStats.

Clears statistics, resets all counters to zero
public void
protected void
doDispose()

Implements abstract net.sf.ehcache.hibernate.management.impl.BaseEmitterBean.doDispose.

Dispose callback of subclasses
public void
public TabularData
public long
public TabularData
public long
public long
getDBSQLExecutionSample()

Not supported right now

public TabularData
public long
public MBeanNotificationInfo[]
getNotificationInfo()

Implements abstract net.sf.ehcache.hibernate.management.impl.BaseEmitterBean.getNotificationInfo.

Implements javax.management.NotificationBroadcaster.getNotificationInfo.

Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

public long
public long
public long
public double
public long
getQueryExecutionSample()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getQueryExecutionSample.

Returns last count sample of HQL's getting executed in the DB.
public TabularData
public long
public long
private Statistics

Returns:

statistics
getStatistics
()

public long
public long
public boolean
isStatisticsEnabled()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.isStatisticsEnabled.

Returns true if statistics collection is enabled otherwise false
public void
setStatisticsEnabled(boolean flag)

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.setStatisticsEnabled.

Enable/Disable statistics collection
Inherited from net.sf.ehcache.hibernate.management.impl.BaseEmitterBean:
addNotificationListenerdisposeremoveNotificationListenerremoveNotificationListenersendNotificationsendNotificationsendNotification

Field Detail

MILLIS_PER_SECONDback to summary
private static final double MILLIS_PER_SECOND
NOTIFICATION_INFOback to summary
private static final MBeanNotificationInfo NOTIFICATION_INFO
sessionFactoryback to summary
private final SessionFactory sessionFactory

Constructor Detail

HibernateStatsImplback to summary
public HibernateStatsImpl(SessionFactory sessionFactory) throws NotCompliantMBeanException

Constructor accepting the backing SessionFactory

Method Detail

clearStatsback to summary
public void clearStats()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.clearStats.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.clearStats.

Clears statistics, resets all counters to zero

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#clearStats()
disableStatsback to summary
public void disableStats()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.disableStats.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.disableStats.

Disables statistics collection

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#disableStats()
doDisposeback to summary
protected void doDispose()

Implements abstract net.sf.ehcache.hibernate.management.impl.BaseEmitterBean.doDispose.

Doc from net.sf.ehcache.hibernate.management.impl.BaseEmitterBean.doDispose.

Dispose callback of subclasses

Annotations
@Override
enableStatsback to summary
public void enableStats()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.enableStats.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.enableStats.

Enables statistics collection

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#enableStats()
getCacheRegionStatsback to summary
public TabularData getCacheRegionStats()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getCacheRegionStats.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getCacheRegionStats.

Returns TabularData of cache region stats

Returns:TabularData

Returns TabularData of cache region stats

getCloseStatementCountback to summary
public long getCloseStatementCount()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getCloseStatementCount.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getCloseStatementCount.

Returns the count of close statements

Returns:long

Returns the count of close statementss

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getCloseStatementCount()
getCollectionStatsback to summary
public TabularData getCollectionStats()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getCollectionStats.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getCollectionStats.

Returns TabularData of collection stats

Returns:TabularData

Returns TabularData of collection stats

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getCollectionStats()
getConnectCountback to summary
public long getConnectCount()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getConnectCount.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getConnectCount.

Return connect counts

Returns:long

Return connect counts

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getConnectCount()
getDBSQLExecutionSampleback to summary
public long getDBSQLExecutionSample()

Not supported right now

getEntityStatsback to summary
public TabularData getEntityStats()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getEntityStats.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getEntityStats.

Returns TabularData of entity stats

Returns:TabularData

Returns TabularData of entity stats

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getEntityStats()
getFlushCountback to summary
public long getFlushCount()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getFlushCount.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getFlushCount.

Returns flush count

Returns:long

Returns flush count

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getFlushCount()
getNotificationInfoback to summary
public MBeanNotificationInfo[] getNotificationInfo()

Implements abstract net.sf.ehcache.hibernate.management.impl.BaseEmitterBean.getNotificationInfo.

Implements javax.management.NotificationBroadcaster.getNotificationInfo.

Doc from javax.management.NotificationBroadcaster.getNotificationInfo.

Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

It is not illegal for the MBean to send notifications not described in this array. However, some clients of the MBean server may depend on the array being complete for their correct functioning.

Returns:MBeanNotificationInfo[]

the array of possible notifications.

Annotations
@Override
See Also
BaseEmitterBean#getNotificationInfo()
getOptimisticFailureCountback to summary
public long getOptimisticFailureCount()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getOptimisticFailureCount.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getOptimisticFailureCount.

Returns Optimistic failure count

Returns:long

Returns Optimistic failure count

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getOptimisticFailureCount()
getPrepareStatementCountback to summary
public long getPrepareStatementCount()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getPrepareStatementCount.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getPrepareStatementCount.

Returns prepare statement count

Returns:long

Returns prepare statement count

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getPrepareStatementCount()
getQueryExecutionCountback to summary
public long getQueryExecutionCount()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getQueryExecutionCount.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getQueryExecutionCount.

Returns the query execution count. This includes only HQL's

Returns:long

Returns the query execution count. This includes only HQL's

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getQueryExecutionCount()
getQueryExecutionRateback to summary
public double getQueryExecutionRate()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getQueryExecutionRate.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getQueryExecutionRate.

Returns rate of HQL query executed in the DB

Returns:double

Returns rate of HQL query executed in the DB

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getQueryExecutionRate()
getQueryExecutionSampleback to summary
public long getQueryExecutionSample()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getQueryExecutionSample.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getQueryExecutionSample.

Returns last count sample of HQL's getting executed in the DB.

Returns:long

Returns last count sample of HQL's getting executed in the DB.

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getQueryExecutionSample()
getQueryStatsback to summary
public TabularData getQueryStats()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getQueryStats.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getQueryStats.

Returns TabularData of query stats

Returns:TabularData

Returns TabularData of query stats

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getQueryStats()
getSessionCloseCountback to summary
public long getSessionCloseCount()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getSessionCloseCount.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getSessionCloseCount.

Returns session close count

Returns:long

Returns session close count

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getSessionCloseCount()
getSessionOpenCountback to summary
public long getSessionOpenCount()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getSessionOpenCount.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getSessionOpenCount.

Returns session open count

Returns:long

Returns session open count

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getSessionOpenCount()
getStatisticsback to summary
private Statistics getStatistics()
Returns:Statistics

statistics

getSuccessfulTransactionCountback to summary
public long getSuccessfulTransactionCount()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getSuccessfulTransactionCount.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getSuccessfulTransactionCount.

Returns successful transaction count

Returns:long

Returns successful transaction count

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getSuccessfulTransactionCount()
getTransactionCountback to summary
public long getTransactionCount()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.getTransactionCount.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.getTransactionCount.

Returns transaction count

Returns:long

Returns transaction count

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getTransactionCount()
isStatisticsEnabledback to summary
public boolean isStatisticsEnabled()

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.isStatisticsEnabled.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.isStatisticsEnabled.

Returns true if statistics collection is enabled otherwise false

Returns:boolean

Returns true if statistics collection is enabled otherwise false

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#isStatisticsEnabled()
setStatisticsEnabledback to summary
public void setStatisticsEnabled(boolean flag)

Implements net.sf.ehcache.hibernate.management.api.HibernateStats.setStatisticsEnabled.

Doc from net.sf.ehcache.hibernate.management.api.HibernateStats.setStatisticsEnabled.

Enable/Disable statistics collection

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#setStatisticsEnabled(boolean)