|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.management.StandardMBean
net.sf.ehcache.hibernate.management.impl.BaseEmitterBean
net.sf.ehcache.hibernate.management.impl.EhcacheHibernate
public class EhcacheHibernate
Implementation of the EhcacheHibernateMBean
| Field Summary |
|---|
| Fields inherited from class net.sf.ehcache.hibernate.management.impl.BaseEmitterBean |
|---|
emitter, sequenceNumber |
| Fields inherited from interface net.sf.ehcache.hibernate.management.api.EhcacheStats |
|---|
CACHE_ENABLED, CACHE_FLUSHED, CACHE_REGION_CHANGED, CACHE_REGION_FLUSHED, CACHE_STATISTICS_ENABLED, CACHE_STATISTICS_RESET |
| 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 |
| Constructor Summary | |
|---|---|
EhcacheHibernate(CacheManager manager)
Constructor accepting the backing CacheManager |
|
| Method Summary | |
|---|---|
void |
clearStats()
Clears statistics, resets all counters to zero |
void |
disableStats()
Disables statistics collection |
protected void |
doDispose()
Dispose callback of subclasses |
void |
enableHibernateStatistics(SessionFactory sessionFactory)
Enable hibernate statistics with the input session factory |
void |
enableStats()
Enables statistics collection |
void |
flushRegionCache(String region)
Flushes the cache for the input region |
void |
flushRegionCaches()
Flushes all the caches for all the regions |
String |
generateActiveConfigDeclaration()
Returns the currently active cache configuration |
String |
generateActiveConfigDeclaration(String region)
Returns the currently active cache configuration for the supplied region |
float |
getAverageGetTimeMillis(String region)
Return average time taken in milliseconds for a get operation for the input cache name |
long |
getCacheHitCount()
Returns hit count for all the caches |
double |
getCacheHitRate()
Returns hit rate for all the caches |
long |
getCacheHitSample()
Returns hit count sample for all the caches |
long |
getCacheMissCount()
Returns miss count for all the caches |
double |
getCacheMissRate()
Returns miss rate for all the caches |
long |
getCacheMissSample()
Returns miss count sample for all the caches |
long |
getCachePutCount()
Returns put count for all the caches |
double |
getCachePutRate()
Returns put rate for all the caches |
long |
getCachePutSample()
Returns put count sample for all the caches |
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 |
getMaxGetTimeMillis()
Return maximum time taken in milliseconds for a get operation |
long |
getMaxGetTimeMillis(String cacheName)
Return maximum time taken in milliseconds for a get operation for the input cache name |
long |
getMinGetTimeMillis()
Return minimum time taken for a get operation in the cache in milliseconds |
long |
getMinGetTimeMillis(String cacheName)
Return minimum time taken in milliseconds for a get operation for the input cache name |
MBeanNotificationInfo[] |
getNotificationInfo()
|
int |
getNumberOfElementsInMemory(String region)
Returns number of elements in-memory in the cache for the input region |
int |
getNumberOfElementsOffHeap(String region)
Returns number of elements off-heap in the cache for the input region |
int |
getNumberOfElementsOnDisk(String region)
Returns number of elements on-disk in the cache for the input region |
long |
getOptimisticFailureCount()
Returns Optimistic failure count |
String |
getOriginalConfigDeclaration()
Get the original cache configuration |
String |
getOriginalConfigDeclaration(String region)
Returns the original cache configuration for the supplied region |
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 |
Map<String,Map<String,Object>> |
getRegionCacheAttributes()
Returns a map containing mapping of all cache region names to their attributes |
Map<String,Object> |
getRegionCacheAttributes(String regionName)
Returns a map containing attributes of the cache for the input cache region name |
int |
getRegionCacheMaxTTISeconds(String region)
Returns the time to idle for the input cache region |
int |
getRegionCacheMaxTTLSeconds(String region)
Returns the time to live for the input cache region |
int |
getRegionCacheOrphanEvictionPeriod(String region)
Returns the orphan eviction period for the input cache region. |
Map<String,int[]> |
getRegionCacheSamples()
Returns a map containing mapping between cache names and an array containing hit, miss and put count samples |
int |
getRegionCacheTargetMaxInMemoryCount(String region)
Returns the maxElementsInMemory of the input cache region |
int |
getRegionCacheTargetMaxTotalCount(String region)
Returns the maxElementsOnDisk of the input cache region |
long |
getSessionCloseCount()
Returns session close count |
long |
getSessionOpenCount()
Returns session open count |
long |
getSuccessfulTransactionCount()
Returns successful transaction count |
String[] |
getTerracottaHibernateCacheRegionNames()
Returns the region names which are clustered with terracotta |
long |
getTransactionCount()
Returns transaction count |
boolean |
isHibernateStatisticsSupported()
Returns true if hibernate statistics is supported. |
boolean |
isRegionCacheEnabled(String region)
Returns true if cache is enabled for the input region |
boolean |
isRegionCacheLoggingEnabled(String region)
Returns true if logging is enabled for the input cache region |
boolean |
isRegionCacheOrphanEvictionEnabled(String region)
Returns true if orphan eviction is enabled for the region otherwise false |
boolean |
isRegionCachesEnabled()
Returns true if all the cache regions are enabled. |
boolean |
isStatisticsEnabled()
Returns true if statistics collection is enabled otherwise false |
boolean |
isTerracottaHibernateCache(String region)
Returns true if the input region is clustered with terracotta |
void |
setRegionCacheEnabled(String region,
boolean enabled)
Enables/disables a particular region |
void |
setRegionCacheLoggingEnabled(String region,
boolean loggingEnabled)
Enable/Disable logging for the input cache region |
void |
setRegionCacheMaxTTISeconds(String region,
int maxTTISeconds)
Sets the time to idle for the input cache region |
void |
setRegionCacheMaxTTLSeconds(String region,
int maxTTLSeconds)
Sets the time to live for the input cache region |
void |
setRegionCachesEnabled(boolean enabled)
Enable/disable all the cache regions. |
void |
setRegionCacheTargetMaxInMemoryCount(String region,
int targetMaxInMemoryCount)
Sets the maxElementsInMemory of the input cache region |
void |
setRegionCacheTargetMaxTotalCount(String region,
int targetMaxTotalCount)
Sets the maxElementsOnDisk of the input cache region |
void |
setStatisticsEnabled(boolean flag)
Enable/Disable statistics collection |
| Methods inherited from class net.sf.ehcache.hibernate.management.impl.BaseEmitterBean |
|---|
addNotificationListener, dispose, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification |
| Methods inherited from class javax.management.StandardMBean |
|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.management.NotificationEmitter |
|---|
removeNotificationListener |
| Methods inherited from interface javax.management.NotificationBroadcaster |
|---|
addNotificationListener, removeNotificationListener |
| Constructor Detail |
|---|
public EhcacheHibernate(CacheManager manager)
throws NotCompliantMBeanException
CacheManager
manager - the backing CacheManager
NotCompliantMBeanException| Method Detail |
|---|
public void enableHibernateStatistics(SessionFactory sessionFactory)
public boolean isHibernateStatisticsSupported()
isHibernateStatisticsSupported in interface EhcacheHibernateMBeanpublic void setStatisticsEnabled(boolean flag)
setStatisticsEnabled in interface HibernateStatspublic boolean isStatisticsEnabled()
isStatisticsEnabled in interface HibernateStatspublic void clearStats()
clearStats in interface HibernateStatspublic void disableStats()
disableStats in interface HibernateStatspublic void enableStats()
enableStats in interface HibernateStatspublic void flushRegionCache(String region)
flushRegionCache in interface EhcacheStatspublic void flushRegionCaches()
flushRegionCaches in interface EhcacheStatspublic String generateActiveConfigDeclaration()
generateActiveConfigDeclaration in interface EhcacheStatspublic String generateActiveConfigDeclaration(String region)
generateActiveConfigDeclaration in interface EhcacheStatspublic long getCacheHitCount()
getCacheHitCount in interface EhcacheStatspublic double getCacheHitRate()
getCacheHitRate in interface EhcacheStatspublic long getCacheHitSample()
getCacheHitSample in interface EhcacheStatspublic long getCacheMissCount()
getCacheMissCount in interface EhcacheStatspublic double getCacheMissRate()
getCacheMissRate in interface EhcacheStatspublic long getCacheMissSample()
getCacheMissSample in interface EhcacheStatspublic long getCachePutCount()
getCachePutCount in interface EhcacheStatspublic double getCachePutRate()
getCachePutRate in interface EhcacheStatspublic long getCachePutSample()
getCachePutSample in interface EhcacheStatspublic TabularData getCacheRegionStats()
TabularData of cache region stats
getCacheRegionStats in interface HibernateStatsTabularData of cache region statspublic long getCloseStatementCount()
getCloseStatementCount in interface HibernateStatspublic TabularData getCollectionStats()
TabularData of collection stats
getCollectionStats in interface HibernateStatsTabularData of collection statspublic long getConnectCount()
getConnectCount in interface HibernateStatspublic TabularData getEntityStats()
TabularData of entity stats
getEntityStats in interface HibernateStatsTabularData of entity statspublic long getFlushCount()
getFlushCount in interface HibernateStatspublic long getOptimisticFailureCount()
getOptimisticFailureCount in interface HibernateStatspublic String getOriginalConfigDeclaration()
getOriginalConfigDeclaration in interface EhcacheStatspublic String getOriginalConfigDeclaration(String region)
getOriginalConfigDeclaration in interface EhcacheStatsregion - for which the configuration is required
public long getPrepareStatementCount()
getPrepareStatementCount in interface HibernateStatspublic long getQueryExecutionCount()
getQueryExecutionCount in interface HibernateStatspublic double getQueryExecutionRate()
getQueryExecutionRate in interface HibernateStatspublic long getQueryExecutionSample()
getQueryExecutionSample in interface HibernateStatspublic TabularData getQueryStats()
TabularData of query stats
getQueryStats in interface HibernateStatsTabularData of query statspublic Map<String,Map<String,Object>> getRegionCacheAttributes()
getRegionCacheAttributes in interface EhcacheStatspublic Map<String,Object> getRegionCacheAttributes(String regionName)
getRegionCacheAttributes in interface EhcacheStatspublic int getRegionCacheMaxTTISeconds(String region)
getRegionCacheMaxTTISeconds in interface EhcacheStatspublic int getRegionCacheMaxTTLSeconds(String region)
getRegionCacheMaxTTLSeconds in interface EhcacheStatspublic int getRegionCacheOrphanEvictionPeriod(String region)
getRegionCacheOrphanEvictionPeriod in interface EhcacheStatspublic Map<String,int[]> getRegionCacheSamples()
getRegionCacheSamples in interface EhcacheStatspublic int getRegionCacheTargetMaxInMemoryCount(String region)
getRegionCacheTargetMaxInMemoryCount in interface EhcacheStatspublic int getRegionCacheTargetMaxTotalCount(String region)
getRegionCacheTargetMaxTotalCount in interface EhcacheStatspublic long getSessionCloseCount()
getSessionCloseCount in interface HibernateStatspublic long getSessionOpenCount()
getSessionOpenCount in interface HibernateStatspublic long getSuccessfulTransactionCount()
getSuccessfulTransactionCount in interface HibernateStatspublic String[] getTerracottaHibernateCacheRegionNames()
getTerracottaHibernateCacheRegionNames in interface EhcacheStatspublic long getTransactionCount()
getTransactionCount in interface HibernateStatspublic boolean isRegionCacheEnabled(String region)
isRegionCacheEnabled in interface EhcacheStatspublic void setRegionCachesEnabled(boolean enabled)
setRegionCachesEnabled in interface EhcacheStats
public void setRegionCacheEnabled(String region,
boolean enabled)
setRegionCacheEnabled in interface EhcacheStatspublic boolean isRegionCacheLoggingEnabled(String region)
isRegionCacheLoggingEnabled in interface EhcacheStatspublic boolean isRegionCacheOrphanEvictionEnabled(String region)
isRegionCacheOrphanEvictionEnabled in interface EhcacheStatspublic boolean isRegionCachesEnabled()
isRegionCachesEnabled in interface EhcacheStatspublic boolean isTerracottaHibernateCache(String region)
isTerracottaHibernateCache in interface EhcacheStats
public void setRegionCacheLoggingEnabled(String region,
boolean loggingEnabled)
setRegionCacheLoggingEnabled in interface EhcacheStats
public void setRegionCacheMaxTTISeconds(String region,
int maxTTISeconds)
setRegionCacheMaxTTISeconds in interface EhcacheStatsmaxTTISeconds - Returns the time to idle for the input cache region
public void setRegionCacheMaxTTLSeconds(String region,
int maxTTLSeconds)
setRegionCacheMaxTTLSeconds in interface EhcacheStats
public void setRegionCacheTargetMaxInMemoryCount(String region,
int targetMaxInMemoryCount)
setRegionCacheTargetMaxInMemoryCount in interface EhcacheStats
public void setRegionCacheTargetMaxTotalCount(String region,
int targetMaxTotalCount)
setRegionCacheTargetMaxTotalCount in interface EhcacheStatspublic int getNumberOfElementsInMemory(String region)
getNumberOfElementsInMemory in interface EhcacheStatsEhcacheStats.getNumberOfElementsInMemory(java.lang.String)public int getNumberOfElementsOffHeap(String region)
getNumberOfElementsOffHeap in interface EhcacheStatsEhcacheStats.getNumberOfElementsInMemory(java.lang.String)public int getNumberOfElementsOnDisk(String region)
getNumberOfElementsOnDisk in interface EhcacheStatsEhcacheStats.getNumberOfElementsOnDisk(java.lang.String)public long getMaxGetTimeMillis()
getMaxGetTimeMillis in interface EhcacheStatsEhcacheStats.getMaxGetTimeMillis()public long getMaxGetTimeMillis(String cacheName)
getMaxGetTimeMillis in interface EhcacheStatsEhcacheStats.getMaxGetTimeMillis(java.lang.String)public long getMinGetTimeMillis()
getMinGetTimeMillis in interface EhcacheStatsEhcacheStats.getMinGetTimeMillis()public long getMinGetTimeMillis(String cacheName)
getMinGetTimeMillis in interface EhcacheStatsEhcacheStats.getMinGetTimeMillis(java.lang.String)public float getAverageGetTimeMillis(String region)
getAverageGetTimeMillis in interface EhcacheStatsEhcacheStats.getAverageGetTimeMillis(java.lang.String)protected void doDispose()
doDispose in class BaseEmitterBeanpublic MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface NotificationBroadcastergetNotificationInfo in class BaseEmitterBeanBaseEmitterBean.getNotificationInfo()
|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||