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

public final Class NullHibernateStats

extends Object
implements HibernateStats
Class Inheritance
All Implemented Interfaces
net.sf.ehcache.hibernate.management.api.HibernateStats, javax.management.NotificationEmitter, javax.management.NotificationBroadcaster
Imports
javax.management.ListenerNotFoundException, .MBeanNotificationInfo, .NotificationFilter, .NotificationListener, javax.management.openmbean.TabularData, net.sf.ehcache.hibernate.management.api.HibernateStats

Implementation of HibernateStats that does nothing

Author
Abhishek Sanoujam

Field Summary

Modifier and TypeField and Description
public static final HibernateStats
INSTANCE

Singleton instance.

Constructor Summary

AccessConstructor and Description
private
NullHibernateStats()

private constructor.

Method Summary

Modifier and TypeMethod and Description
public void
addNotificationListener(NotificationListener
The listener object which will handle the notifications emitted by the broadcaster.
listener
,
NotificationFilter
The filter object. If filter is null, no filtering will be performed before handling notifications.
filter
,
Object
An opaque object to be sent back to the listener when a notification is emitted. This object cannot be used by the Notification broadcaster object. It should be resent unchanged with the notification to the listener.
handback
)

Implements javax.management.NotificationBroadcaster.addNotificationListener.

Adds a listener to this MBean.
public void
clearStats()

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

Clears statistics, resets all counters to zero
public void
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 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
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
removeNotificationListener(NotificationListener
A listener that was previously added to this MBean.
listener
,
NotificationFilter
The filter that was specified when the listener was added.
filter
,
Object
The handback that was specified when the listener was added.
handback
)

Implements javax.management.NotificationEmitter.removeNotificationListener.

Removes a listener from this MBean.

public void
removeNotificationListener(NotificationListener
A listener that was previously added to this MBean.
listener
)

Implements javax.management.NotificationBroadcaster.removeNotificationListener.

Removes a listener from this MBean.
public void
setStatisticsEnabled(boolean flag)

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

Enable/Disable statistics collection
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final HibernateStats INSTANCE

Singleton instance.

Constructor Detail

NullHibernateStatsback to summary
private NullHibernateStats()

private constructor. No need to create instances of this. Use singleton instance

Method Detail

addNotificationListenerback to summary
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException

Implements javax.management.NotificationBroadcaster.addNotificationListener.

Doc from javax.management.NotificationBroadcaster.addNotificationListener.

Adds a listener to this MBean.

Parameters
listener:NotificationListener

The listener object which will handle the notifications emitted by the broadcaster.

filter:NotificationFilter

The filter object. If filter is null, no filtering will be performed before handling notifications.

handback:Object

An opaque object to be sent back to the listener when a notification is emitted. This object cannot be used by the Notification broadcaster object. It should be resent unchanged with the notification to the listener.

Exceptions
IllegalArgumentException:
Listener parameter is null.
See Also
javax.management.NotificationBroadcaster#addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
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()
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

See Also
net.sf.ehcache.hibernate.management.api.HibernateStats#getCacheRegionStats()
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 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.

See Also
javax.management.NotificationBroadcaster#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()
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()
removeNotificationListenerback to summary
public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException

Implements javax.management.NotificationEmitter.removeNotificationListener.

Doc from javax.management.NotificationEmitter.removeNotificationListener.

Removes a listener from this MBean. The MBean must have a listener that exactly matches the given listener, filter, and handback parameters. If there is more than one such listener, only one is removed.

The filter and handback parameters may be null if and only if they are null in a listener to be removed.

Parameters
listener:NotificationListener

A listener that was previously added to this MBean.

filter:NotificationFilter

The filter that was specified when the listener was added.

handback:Object

The handback that was specified when the listener was added.

Exceptions
ListenerNotFoundException:
The listener is not registered with the MBean, or it is not registered with the given filter and handback.
See Also
javax.management.NotificationEmitter#removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
removeNotificationListenerback to summary
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException

Implements javax.management.NotificationBroadcaster.removeNotificationListener.

Doc from javax.management.NotificationBroadcaster.removeNotificationListener.

Removes a listener from this MBean. If the listener has been registered with different handback objects or notification filters, all entries corresponding to the listener will be removed.

Parameters
listener:NotificationListener

A listener that was previously added to this MBean.

Exceptions
ListenerNotFoundException:
The listener is not registered with the MBean.
See Also
javax.management.NotificationBroadcaster#removeNotificationListener(javax.management.NotificationListener)
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)