ehcache

net.sf.ehcache.management.sampled
Interface SampledCacheManagerMBean

All Known Implementing Classes:
SampledCacheManager

public interface SampledCacheManagerMBean

An MBean for CacheManager exposing sampled cache usage statistics

Since:
1.7
Author:
Abhishek Sanoujam

Method Summary
 void clearAll()
          Clears the contents of all caches in the CacheManager, but without removing any caches.
 long getCacheEvictionRate()
           
 long getCacheExpirationRate()
           
 long getCacheHitRate()
           
 java.util.Map<java.lang.String,long[]> getCacheMetrics()
          Get a map of cache name to performance metrics (hits, misses).
 long getCacheMissRate()
           
 java.lang.String[] getCacheNames()
          Gets the cache names managed by the CacheManager
 long getCachePutRate()
           
 long getCacheUpdateRate()
           
 java.lang.String getMBeanRegisteredName()
          Gets the name used to register this mbean.
 java.lang.String getName()
          Gets the actual name of the cache manager.
 java.lang.String getStatus()
          Gets the status attribute of the Ehcache
 void shutdown()
          Shuts down the CacheManager.
 

Method Detail

getName

java.lang.String getName()
Gets the actual name of the cache manager. This may be different from the name used to register this mbean as there can potentially be multiple cache managers with same name


getMBeanRegisteredName

java.lang.String getMBeanRegisteredName()
Gets the name used to register this mbean.


getStatus

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

Returns:
The status value, as a String from the Status enum class

shutdown

void shutdown()
Shuts down the CacheManager.

If the shutdown occurs on the singleton, then the singleton is removed, so that if a singleton access method is called, a new singleton will be created.


clearAll

void clearAll()
Clears the contents of all caches in the CacheManager, but without removing any caches.

This method is not synchronized. It only guarantees to clear those elements in a cache at the time that the Ehcache.removeAll() mehod on each cache is called.


getCacheNames

java.lang.String[] getCacheNames()
                                 throws java.lang.IllegalStateException
Gets the cache names managed by the CacheManager

Throws:
java.lang.IllegalStateException

getCacheMetrics

java.util.Map<java.lang.String,long[]> getCacheMetrics()
Get a map of cache name to performance metrics (hits, misses).

Returns:
a map of cache metrics

getCacheHitRate

long getCacheHitRate()
Returns:
aggregate hit rate

getCacheMissRate

long getCacheMissRate()
Returns:
aggregate miss rate

getCachePutRate

long getCachePutRate()
Returns:
aggregate put rate

getCacheUpdateRate

long getCacheUpdateRate()
Returns:
aggregate update rate

getCacheEvictionRate

long getCacheEvictionRate()
Returns:
aggregate eviction rate

getCacheExpirationRate

long getCacheExpirationRate()
Returns:
aggregate expiration rate

ehcache

true