ehcache

net.sf.ehcache.hibernate.management.api
Interface HibernateStats

All Superinterfaces:
NotificationBroadcaster, NotificationEmitter
All Known Subinterfaces:
EhcacheHibernateMBean
All Known Implementing Classes:
EhcacheHibernate, HibernateStatsImpl, NullHibernateStats

public interface HibernateStats
extends NotificationEmitter

Interface for hibernate related statistics of hibernate second level cache

Author:
Abhishek Sanoujam

Field Summary
static String CACHE_ENABLED
          CACHE_ENABLED
static String CACHE_FLUSHED
          CACHE_FLUSHED
static String CACHE_REGION_CHANGED
          CACHE_REGION_CHANGED
static String CACHE_REGION_FLUSHED
          CACHE_REGION_FLUSHED
static String CACHE_STATISTICS_ENABLED
          CACHE_STATISTICS_ENABLED
static String CACHE_STATISTICS_RESET
          CACHE_STATISTICS_RESET
 
Method Summary
 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
 TabularData getEntityStats()
          Returns TabularData of entity stats
 long getFlushCount()
          Returns flush count
 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 setStatisticsEnabled(boolean flag)
          Enable/Disable statistics collection
 
Methods inherited from interface javax.management.NotificationEmitter
removeNotificationListener
 
Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener
 

Field Detail

CACHE_ENABLED

static final String CACHE_ENABLED
CACHE_ENABLED

See Also:
Constant Field Values

CACHE_REGION_CHANGED

static final String CACHE_REGION_CHANGED
CACHE_REGION_CHANGED

See Also:
Constant Field Values

CACHE_FLUSHED

static final String CACHE_FLUSHED
CACHE_FLUSHED

See Also:
Constant Field Values

CACHE_REGION_FLUSHED

static final String CACHE_REGION_FLUSHED
CACHE_REGION_FLUSHED

See Also:
Constant Field Values

CACHE_STATISTICS_ENABLED

static final String CACHE_STATISTICS_ENABLED
CACHE_STATISTICS_ENABLED

See Also:
Constant Field Values

CACHE_STATISTICS_RESET

static final String CACHE_STATISTICS_RESET
CACHE_STATISTICS_RESET

See Also:
Constant Field Values
Method Detail

isStatisticsEnabled

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

Returns:
Returns true if statistics collection is enabled otherwise false

setStatisticsEnabled

void setStatisticsEnabled(boolean flag)
Enable/Disable statistics collection

Parameters:
flag -

enableStats

void enableStats()
Enables statistics collection


disableStats

void disableStats()
Disables statistics collection


clearStats

void clearStats()
Clears statistics, resets all counters to zero


getQueryExecutionCount

long getQueryExecutionCount()
Returns the query execution count. This includes only HQL's

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

getQueryExecutionSample

long getQueryExecutionSample()
Returns last count sample of HQL's getting executed in the DB.

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

getQueryExecutionRate

double getQueryExecutionRate()
Returns rate of HQL query executed in the DB

Returns:
Returns rate of HQL query executed in the DB

getCloseStatementCount

long getCloseStatementCount()
Returns the count of close statements

Returns:
Returns the count of close statementss

getConnectCount

long getConnectCount()
Return connect counts

Returns:
Return connect counts

getFlushCount

long getFlushCount()
Returns flush count

Returns:
Returns flush count

getOptimisticFailureCount

long getOptimisticFailureCount()
Returns Optimistic failure count

Returns:
Returns Optimistic failure count

getPrepareStatementCount

long getPrepareStatementCount()
Returns prepare statement count

Returns:
Returns prepare statement count

getSessionCloseCount

long getSessionCloseCount()
Returns session close count

Returns:
Returns session close count

getSessionOpenCount

long getSessionOpenCount()
Returns session open count

Returns:
Returns session open count

getSuccessfulTransactionCount

long getSuccessfulTransactionCount()
Returns successful transaction count

Returns:
Returns successful transaction count

getTransactionCount

long getTransactionCount()
Returns transaction count

Returns:
Returns transaction count

getEntityStats

TabularData getEntityStats()
Returns TabularData of entity stats

Returns:
Returns TabularData of entity stats

getCollectionStats

TabularData getCollectionStats()
Returns TabularData of collection stats

Returns:
Returns TabularData of collection stats

getQueryStats

TabularData getQueryStats()
Returns TabularData of query stats

Returns:
Returns TabularData of query stats

getCacheRegionStats

TabularData getCacheRegionStats()
Returns TabularData of cache region stats

Returns:
Returns TabularData of cache region stats

ehcache

Copyright 2001-2014, Terracotta, Inc.