|
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.management.sampled.SampledCache
public class SampledCache
An implementation of SampledCacheMBean
| Field Summary |
|---|
| Fields inherited from class net.sf.ehcache.hibernate.management.impl.BaseEmitterBean |
|---|
emitter, sequenceNumber |
| Fields inherited from interface net.sf.ehcache.management.sampled.SampledCacheMBean |
|---|
CACHE_CHANGED, CACHE_CLEARED, CACHE_ENABLED, CACHE_FLUSHED, CACHE_STATISTICS_ENABLED, CACHE_STATISTICS_RESET |
| Constructor Summary | |
|---|---|
SampledCache(Ehcache cache)
Constructor accepting the backing Ehcache |
|
| Method Summary | |
|---|---|
void |
clearStatistics()
Clear both sampled and cumulative statistics |
void |
deregistered(CacheConfiguration config)
Indicates that this listener was removed from the given configuration |
void |
disableSampledStatistics()
Disables statistics collection |
void |
disableStatistics()
Disables statistics collection. |
void |
diskCapacityChanged(int oldCapacity,
int newCapacity)
Indicates a change in the configurations disk store capacity |
void |
dispose()
Method used to dispose this statistics |
void |
enableSampledStatistics()
Enables statistics collection. |
void |
enableStatistics()
Enables statistics collection |
void |
flush()
Flushes all cache items from memory to the disk store, and from the DiskStore to disk. |
float |
getAverageGetTimeMillis()
Average time in milli seconds taken to get an element from the cache. |
long |
getAverageGetTimeMostRecentSample()
Get most recent value for average time taken for get() operation in the cache |
java.util.Map<java.lang.String,java.lang.Object> |
getCacheAttributes()
getCacheAttributes |
long |
getCacheElementEvictedMostRecentSample()
Get most recent value element evicted from cache |
long |
getCacheElementExpiredMostRecentSample()
Get most recent value element expired from cache |
long |
getCacheElementPutMostRecentSample()
Get most recent value element puts in the cache |
long |
getCacheElementRemovedMostRecentSample()
Get most recent value element removed from cache |
long |
getCacheElementUpdatedMostRecentSample()
Get most recent value element updates , i.e. |
long |
getCacheHitCount()
The number of times a requested item was found in the cache. |
long |
getCacheHitInMemoryMostRecentSample()
Get most recent value for in-memory cache hit |
long |
getCacheHitMostRecentSample()
Get most recent value for cache hit |
long |
getCacheHitOnDiskMostRecentSample()
Get most recent value for on-disk cache hit |
long |
getCacheMissCount()
|
long |
getCacheMissCountExpired()
|
long |
getCacheMissExpiredMostRecentSample()
Get most recent value for cache miss as result of the element getting expired |
long |
getCacheMissMostRecentSample()
Get most recent value for cache miss |
long |
getCacheMissNotFoundMostRecentSample()
Get most recent value for cache miss as result of the element not found in cache |
java.lang.String |
getCacheName()
|
long |
getConfigDiskExpiryThreadIntervalSeconds()
Configuration property accessor |
int |
getConfigMaxElementsInMemory()
Configuration property accessor |
int |
getConfigMaxElementsOnDisk()
Configuration property accessor |
java.lang.String |
getConfigMemoryStoreEvictionPolicy()
Configuration property accessor |
long |
getConfigTimeToIdleSeconds()
Configuration property accessor |
long |
getConfigTimeToLiveSeconds()
Configuration property accessor |
long |
getEvictedCount()
Number of elements evicted from the cache |
long |
getExpiredCount()
Number of elements expired since creation or last clear |
long |
getInMemoryHitCount()
Number of times a requested item was found in the Memory Store. |
long |
getInMemorySize()
Number of elements in the MemoryStore |
long |
getMaxGetTimeMillis()
Return maximum time taken for a get operation in the cache in milliseconds |
long |
getMinGetTimeMillis()
Return minimum time taken for a get operation in the cache in milliseconds |
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
|
long |
getOnDiskHitCount()
Number of times a requested item was found in the Disk Store. |
long |
getOnDiskSize()
Number of elements in the DiskStore |
long |
getPutCount()
Number of puts that has happened in the cache |
long |
getRemovedCount()
Number of elements removed since creation or last clear |
long |
getSize()
Size of the cache based on current accuracy settings. |
int |
getStatisticsAccuracy()
Accurately measuring statistics can be expensive. |
java.lang.String |
getStatisticsAccuracyDescription()
Accurately measuring statistics can be expensive. |
java.lang.String |
getStatus()
Gets the status attribute of the Cache. |
long |
getUpdateCount()
Number of updates that as happened in the cache |
boolean |
isClusterCoherent()
Is the cache coherent cluster-wide? |
boolean |
isConfigDiskPersistent()
Configuration property accessor |
boolean |
isConfigEternal()
Configuration property accessor |
boolean |
isConfigLoggingEnabled()
Configuration property accessor |
boolean |
isConfigOverflowToDisk()
Configuration property accessor |
boolean |
isEnabled()
Is the cache enabled? |
boolean |
isNodeCoherent()
Is the cache coherent locally? |
boolean |
isSampledStatisticsEnabled()
Returns true if statistics collection is enabled for cache, otherwise false |
boolean |
isStatisticsEnabled()
Returns true if statistics is enabled |
boolean |
isTerracottaClustered()
Is the cache configured with Terracotta clustering? |
void |
loggingEnabledChanged(boolean oldValue,
boolean newValue)
Indicates a change in the configuration for enable/disable logging |
void |
memoryCapacityChanged(int oldCapacity,
int newCapacity)
Indicates a change in the configurations memory store capacity |
void |
registered(CacheConfiguration config)
Indicates that this listener was registered with the given configuration |
void |
removeAll()
Removes all cached items. |
void |
setConfigDiskExpiryThreadIntervalSeconds(long seconds)
setConfigDiskExpiryThreadIntervalSeconds |
void |
setConfigDiskPersistent(boolean diskPersistent)
setConfigDiskPersistent |
void |
setConfigEternal(boolean eternal)
setConfigEternal |
void |
setConfigLoggingEnabled(boolean enabled)
setConfigLoggingEnabled |
void |
setConfigMaxElementsInMemory(int maxElements)
setConfigMaxElementsInMemory |
void |
setConfigMaxElementsOnDisk(int maxElements)
setConfigMaxElementsOnDisk |
void |
setConfigMemoryStoreEvictionPolicy(java.lang.String evictionPolicy)
setConfigMemoryStoreEvictionPolicy |
void |
setConfigOverflowToDisk(boolean overflowToDisk)
setConfigOverflowToDisk |
void |
setConfigTimeToIdleSeconds(long tti)
setConfigTimeToIdleSeconds |
void |
setConfigTimeToLiveSeconds(long ttl)
setConfigTimeToLiveSeconds |
void |
setEnabled(boolean enabled)
Enabled/disable the cache. |
void |
setNodeCoherent(boolean coherent)
Enabled/disable cache coherence mode for this node. |
void |
timeToIdleChanged(long oldTimeToIdle,
long newTimeToIdle)
Indicates a change in the configurations time to idle |
void |
timeToLiveChanged(long oldTimeToLive,
long newTimeToLive)
Indicates a change in the configurations time to live |
| Methods inherited from class net.sf.ehcache.hibernate.management.impl.BaseEmitterBean |
|---|
addNotificationListener, 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 |
| Constructor Detail |
|---|
public SampledCache(Ehcache cache)
throws javax.management.NotCompliantMBeanException
Ehcache
cache -
javax.management.NotCompliantMBeanException| Method Detail |
|---|
public boolean isEnabled()
isEnabled in interface SampledCacheMBeanpublic void setEnabled(boolean enabled)
setEnabled in interface SampledCacheMBeanpublic boolean isClusterCoherent()
isClusterCoherent in interface SampledCacheMBeanpublic boolean isNodeCoherent()
isNodeCoherent in interface SampledCacheMBeanpublic void setNodeCoherent(boolean coherent)
setNodeCoherent in interface SampledCacheMBeanpublic void flush()
flush in interface SampledCacheMBeanpublic java.lang.String getCacheName()
getCacheName in interface LiveCacheStatisticspublic java.lang.String getStatus()
getStatus in interface SampledCacheMBeanpublic void removeAll()
removeAll in interface SampledCacheMBeanpublic long getAverageGetTimeMostRecentSample()
getAverageGetTimeMostRecentSample in interface SampledCacheStatisticspublic long getCacheElementEvictedMostRecentSample()
getCacheElementEvictedMostRecentSample in interface SampledCacheStatisticspublic long getCacheElementExpiredMostRecentSample()
getCacheElementExpiredMostRecentSample in interface SampledCacheStatisticspublic long getCacheElementPutMostRecentSample()
getCacheElementPutMostRecentSample in interface SampledCacheStatisticspublic long getCacheElementRemovedMostRecentSample()
getCacheElementRemovedMostRecentSample in interface SampledCacheStatisticspublic long getCacheElementUpdatedMostRecentSample()
getCacheElementUpdatedMostRecentSample in interface SampledCacheStatisticspublic long getCacheHitInMemoryMostRecentSample()
getCacheHitInMemoryMostRecentSample in interface SampledCacheStatisticspublic long getCacheHitMostRecentSample()
getCacheHitMostRecentSample in interface SampledCacheStatisticspublic long getCacheHitOnDiskMostRecentSample()
getCacheHitOnDiskMostRecentSample in interface SampledCacheStatisticspublic long getCacheMissExpiredMostRecentSample()
getCacheMissExpiredMostRecentSample in interface SampledCacheStatisticspublic long getCacheMissMostRecentSample()
getCacheMissMostRecentSample in interface SampledCacheStatisticspublic long getCacheMissNotFoundMostRecentSample()
getCacheMissNotFoundMostRecentSample in interface SampledCacheStatisticspublic int getStatisticsAccuracy()
getStatisticsAccuracy in interface LiveCacheStatisticsgetStatisticsAccuracy in interface SampledCacheStatisticspublic java.lang.String getStatisticsAccuracyDescription()
getStatisticsAccuracyDescription in interface LiveCacheStatisticsgetStatisticsAccuracyDescription in interface SampledCacheStatisticspublic void clearStatistics()
clearStatistics in interface SampledCacheMBeanclearStatistics in interface LiveCacheStatisticsclearStatistics in interface SampledCacheStatisticspublic boolean isStatisticsEnabled()
isStatisticsEnabled in interface LiveCacheStatisticspublic boolean isSampledStatisticsEnabled()
isSampledStatisticsEnabled in interface SampledCacheStatisticspublic boolean isTerracottaClustered()
isTerracottaClustered in interface SampledCacheMBeanpublic void enableStatistics()
enableStatistics in interface SampledCacheMBeanSampledCacheMBean.enableStatistics()public void disableStatistics()
disableStatistics in interface SampledCacheMBeanSampledCacheMBean.disableStatistics()public void enableSampledStatistics()
enableSampledStatistics in interface SampledCacheMBeanSampledCacheMBean.enableSampledStatistics()public void disableSampledStatistics()
disableSampledStatistics in interface SampledCacheMBean()public float getAverageGetTimeMillis()
getAverageGetTimeMillis in interface LiveCacheStatisticsLiveCacheStatistics.getAverageGetTimeMillis()public long getMaxGetTimeMillis()
getMaxGetTimeMillis in interface LiveCacheStatisticsLiveCacheStatistics.getMaxGetTimeMillis()public long getMinGetTimeMillis()
getMinGetTimeMillis in interface LiveCacheStatisticsLiveCacheStatistics.getMinGetTimeMillis()public long getCacheHitCount()
getCacheHitCount in interface LiveCacheStatisticsLiveCacheStatistics.getCacheHitCount()public long getCacheMissCount()
getCacheMissCount in interface LiveCacheStatisticsLiveCacheStatistics.getCacheMissCount()public long getCacheMissCountExpired()
getCacheMissCountExpired in interface LiveCacheStatisticsLiveCacheStatistics.getCacheMissCountExpired()public long getConfigDiskExpiryThreadIntervalSeconds()
getConfigDiskExpiryThreadIntervalSeconds in interface SampledCacheMBeanSampledCacheMBean.getConfigDiskExpiryThreadIntervalSeconds()public void setConfigDiskExpiryThreadIntervalSeconds(long seconds)
setConfigDiskExpiryThreadIntervalSeconds in interface SampledCacheMBeanSampledCacheMBean.setConfigDiskExpiryThreadIntervalSeconds(long)public int getConfigMaxElementsInMemory()
getConfigMaxElementsInMemory in interface SampledCacheMBeanSampledCacheMBean.getConfigMaxElementsInMemory()public void setConfigMaxElementsInMemory(int maxElements)
setConfigMaxElementsInMemory in interface SampledCacheMBeanSampledCacheMBean.setConfigMaxElementsInMemory(int)public int getConfigMaxElementsOnDisk()
getConfigMaxElementsOnDisk in interface SampledCacheMBeanSampledCacheMBean.getConfigMaxElementsOnDisk()public void setConfigMaxElementsOnDisk(int maxElements)
setConfigMaxElementsOnDisk in interface SampledCacheMBeanSampledCacheMBean.setConfigMaxElementsOnDisk(int)public java.lang.String getConfigMemoryStoreEvictionPolicy()
getConfigMemoryStoreEvictionPolicy in interface SampledCacheMBeanSampledCacheMBean.getConfigMemoryStoreEvictionPolicy()public void setConfigMemoryStoreEvictionPolicy(java.lang.String evictionPolicy)
setConfigMemoryStoreEvictionPolicy in interface SampledCacheMBeanSampledCacheMBean.setConfigMemoryStoreEvictionPolicy(String)public long getConfigTimeToIdleSeconds()
getConfigTimeToIdleSeconds in interface SampledCacheMBeanSampledCacheMBean.getConfigTimeToIdleSeconds()public void setConfigTimeToIdleSeconds(long tti)
setConfigTimeToIdleSeconds in interface SampledCacheMBeanSampledCacheMBean.setConfigTimeToIdleSeconds(long)public long getConfigTimeToLiveSeconds()
getConfigTimeToLiveSeconds in interface SampledCacheMBeanSampledCacheMBean.getConfigTimeToLiveSeconds()public void setConfigTimeToLiveSeconds(long ttl)
setConfigTimeToLiveSeconds in interface SampledCacheMBeanSampledCacheMBean.setConfigTimeToLiveSeconds(long)public boolean isConfigDiskPersistent()
isConfigDiskPersistent in interface SampledCacheMBeanSampledCacheMBean.isConfigDiskPersistent()public void setConfigDiskPersistent(boolean diskPersistent)
setConfigDiskPersistent in interface SampledCacheMBeanSampledCacheMBean.setConfigDiskPersistent(boolean)public boolean isConfigEternal()
isConfigEternal in interface SampledCacheMBeanSampledCacheMBean.isConfigEternal()public void setConfigEternal(boolean eternal)
setConfigEternal in interface SampledCacheMBeanSampledCacheMBean.setConfigEternal(boolean)public boolean isConfigOverflowToDisk()
isConfigOverflowToDisk in interface SampledCacheMBeanSampledCacheMBean.isConfigOverflowToDisk()public void setConfigOverflowToDisk(boolean overflowToDisk)
setConfigOverflowToDisk in interface SampledCacheMBeanSampledCacheMBean.setConfigOverflowToDisk(boolean)public boolean isConfigLoggingEnabled()
isConfigLoggingEnabled in interface SampledCacheMBeanSampledCacheMBean.isConfigLoggingEnabled()public void setConfigLoggingEnabled(boolean enabled)
setConfigLoggingEnabled in interface SampledCacheMBeanSampledCacheMBean.setConfigLoggingEnabled(boolean)public long getEvictedCount()
getEvictedCount in interface LiveCacheStatisticsLiveCacheStatistics.getEvictedCount()public long getExpiredCount()
getExpiredCount in interface LiveCacheStatisticsLiveCacheStatistics.getExpiredCount()public long getInMemoryHitCount()
getInMemoryHitCount in interface LiveCacheStatisticsLiveCacheStatistics.getInMemoryHitCount()public long getInMemorySize()
getInMemorySize in interface LiveCacheStatisticsLiveCacheStatistics.getInMemorySize()public long getOnDiskHitCount()
getOnDiskHitCount in interface LiveCacheStatisticsLiveCacheStatistics.getOnDiskHitCount()public long getOnDiskSize()
getOnDiskSize in interface LiveCacheStatisticsLiveCacheStatistics.getOnDiskSize()public long getPutCount()
getPutCount in interface LiveCacheStatisticsLiveCacheStatistics.getPutCount()public long getRemovedCount()
getRemovedCount in interface LiveCacheStatisticsLiveCacheStatistics.getRemovedCount()public long getSize()
getSize in interface LiveCacheStatisticsLiveCacheStatistics.getSize()public long getUpdateCount()
getUpdateCount in interface LiveCacheStatisticsLiveCacheStatistics.getUpdateCount()public java.util.Map<java.lang.String,java.lang.Object> getCacheAttributes()
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface javax.management.NotificationBroadcastergetNotificationInfo in class BaseEmitterBeanBaseEmitterBean.getNotificationInfo()public void deregistered(CacheConfiguration config)
deregistered in interface CacheConfigurationListener
public void diskCapacityChanged(int oldCapacity,
int newCapacity)
diskCapacityChanged in interface CacheConfigurationListeneroldCapacity - previous capacitynewCapacity - new capacity
public void loggingEnabledChanged(boolean oldValue,
boolean newValue)
loggingEnabledChanged in interface CacheConfigurationListeneroldValue - old value whether logging was enabled or notnewValue - new value whether logging was enabled or not
public void memoryCapacityChanged(int oldCapacity,
int newCapacity)
memoryCapacityChanged in interface CacheConfigurationListeneroldCapacity - previous capacitynewCapacity - new capacitypublic void registered(CacheConfiguration config)
registered in interface CacheConfigurationListener
public void timeToIdleChanged(long oldTimeToIdle,
long newTimeToIdle)
timeToIdleChanged in interface CacheConfigurationListeneroldTimeToIdle - previous time to idle valuenewTimeToIdle - new time to idle value
public void timeToLiveChanged(long oldTimeToLive,
long newTimeToLive)
timeToLiveChanged in interface CacheConfigurationListeneroldTimeToLive - previous time to live valuenewTimeToLive - new time to live valuepublic void dispose()
dispose in interface SampledCacheStatisticsSampledCacheStatistics.dispose()
|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||