ehcache

net.sf.ehcache.management.sampled
Interface SampledCacheMBean

All Superinterfaces:
LiveCacheStatistics, SampledCacheStatistics
All Known Implementing Classes:
SampledCache

public interface SampledCacheMBean
extends LiveCacheStatistics, SampledCacheStatistics

An MBean for Cache exposing cache statistics. Extends from both LiveCacheStatistics and SampledCacheStatistics

Since:
1.7
Author:
Abhishek Sanoujam

Method Summary
 void clearStatistics()
          Clear both sampled and cumulative statistics
 void disableSampledStatistics()
          Disables statistics collection
 void disableStatistics()
          Disables statistics collection.
 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.
 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
 java.lang.String getStatus()
          Gets the status attribute of the Cache.
 boolean isConfigDiskPersistent()
          Configuration property accessor
 boolean isConfigEternal()
          Configuration property accessor
 boolean isConfigOverflowToDisk()
          Configuration property accessor
 boolean isTerracottaClustered()
          Is the cache configured with Terracotta clustering?
 void removeAll()
          Removes all cached items.
 
Methods inherited from interface net.sf.ehcache.statistics.LiveCacheStatistics
getAverageGetTimeMillis, getCacheHitCount, getCacheMissCount, getCacheMissCountExpired, getCacheName, getEvictedCount, getExpiredCount, getInMemoryHitCount, getInMemorySize, getOnDiskHitCount, getOnDiskSize, getPutCount, getRemovedCount, getSize, getStatisticsAccuracy, getStatisticsAccuracyDescription, getUpdateCount, isStatisticsEnabled
 
Methods inherited from interface net.sf.ehcache.statistics.sampled.SampledCacheStatistics
dispose, getAverageGetTimeMostRecentSample, getCacheElementEvictedMostRecentSample, getCacheElementExpiredMostRecentSample, getCacheElementPutMostRecentSample, getCacheElementRemovedMostRecentSample, getCacheElementUpdatedMostRecentSample, getCacheHitInMemoryMostRecentSample, getCacheHitMostRecentSample, getCacheHitOnDiskMostRecentSample, getCacheMissExpiredMostRecentSample, getCacheMissMostRecentSample, getCacheMissNotFoundMostRecentSample, getStatisticsAccuracy, getStatisticsAccuracyDescription, isSampledStatisticsEnabled
 

Method Detail

removeAll

void removeAll()
Removes all cached items.


flush

void flush()
Flushes all cache items from memory to the disk store, and from the DiskStore to disk.


getStatus

java.lang.String getStatus()
Gets the status attribute of the Cache.

Returns:
The status value from the Status enum class

isTerracottaClustered

boolean isTerracottaClustered()
Is the cache configured with Terracotta clustering?

Returns:
true if clustered with terracotta

clearStatistics

void clearStatistics()
Clear both sampled and cumulative statistics


enableStatistics

void enableStatistics()
Enables statistics collection


disableStatistics

void disableStatistics()
Disables statistics collection. Also disables sampled statistics if it is enabled.


enableSampledStatistics

void enableSampledStatistics()
Enables statistics collection. As it requires that normal statistics collection to be enabled, it enables it if its not already


disableSampledStatistics

void disableSampledStatistics()
Disables statistics collection


getConfigMaxElementsInMemory

int getConfigMaxElementsInMemory()
Configuration property accessor

Returns:
Max elements in memory config setting value

getConfigMaxElementsOnDisk

int getConfigMaxElementsOnDisk()
Configuration property accessor

Returns:
Max elements on disk config setting value

getConfigMemoryStoreEvictionPolicy

java.lang.String getConfigMemoryStoreEvictionPolicy()
Configuration property accessor

Returns:
a String representation of the policy

isConfigEternal

boolean isConfigEternal()
Configuration property accessor

Returns:
true if set to eternal in config

getConfigTimeToIdleSeconds

long getConfigTimeToIdleSeconds()
Configuration property accessor

Returns:
TTI in config

getConfigTimeToLiveSeconds

long getConfigTimeToLiveSeconds()
Configuration property accessor

Returns:
TTL in config

isConfigOverflowToDisk

boolean isConfigOverflowToDisk()
Configuration property accessor

Returns:
true if overflow to disk specified in config

isConfigDiskPersistent

boolean isConfigDiskPersistent()
Configuration property accessor

Returns:
true if configured with disk persistence

getConfigDiskExpiryThreadIntervalSeconds

long getConfigDiskExpiryThreadIntervalSeconds()
Configuration property accessor

Returns:
Value for disk expiry thread interval in seconds specified in config

ehcache

true