Class JCacheStatisticsMXBeanImpl
java.lang.Object
com.loomcache.server.jcache.JCacheStatisticsMXBeanImpl
- All Implemented Interfaces:
JCacheStatisticsMXBean
Thread-safe implementation of
JCacheStatisticsMXBean backed by a
CacheStatisticsManager.
All method calls delegate to the underlying statistics manager, which
provides its own lock-based thread safety via ReentrantLock.
- Since:
- 2.0
-
Constructor Summary
ConstructorsConstructorDescriptionJCacheStatisticsMXBeanImpl(CacheStatisticsManager statistics) Create a statistics MXBean backed by the given statistics manager. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all collected statistics.floatAverage time in microseconds for get operations.floatAverage time in microseconds for put operations.floatAverage time in microseconds for remove operations.longTotal number of evictions.longTotal number of gets (hits + misses).floatCache hit percentage (0.0–100.0).longTotal number of cache hits.longTotal number of cache misses.floatCache miss percentage (0.0–100.0).longTotal number of puts.longTotal number of removals.
-
Constructor Details
-
JCacheStatisticsMXBeanImpl
Create a statistics MXBean backed by the given statistics manager.- Parameters:
statistics- the statistics manager to delegate to (must not be null)
-
-
Method Details
-
getCacheHits
public long getCacheHits()Description copied from interface:JCacheStatisticsMXBeanTotal number of cache hits.- Specified by:
getCacheHitsin interfaceJCacheStatisticsMXBean
-
getCacheMisses
public long getCacheMisses()Description copied from interface:JCacheStatisticsMXBeanTotal number of cache misses.- Specified by:
getCacheMissesin interfaceJCacheStatisticsMXBean
-
getCacheGets
public long getCacheGets()Description copied from interface:JCacheStatisticsMXBeanTotal number of gets (hits + misses).- Specified by:
getCacheGetsin interfaceJCacheStatisticsMXBean
-
getCachePuts
public long getCachePuts()Description copied from interface:JCacheStatisticsMXBeanTotal number of puts.- Specified by:
getCachePutsin interfaceJCacheStatisticsMXBean
-
getCacheRemovals
public long getCacheRemovals()Description copied from interface:JCacheStatisticsMXBeanTotal number of removals.- Specified by:
getCacheRemovalsin interfaceJCacheStatisticsMXBean
-
getCacheEvictions
public long getCacheEvictions()Description copied from interface:JCacheStatisticsMXBeanTotal number of evictions.- Specified by:
getCacheEvictionsin interfaceJCacheStatisticsMXBean
-
getCacheHitPercentage
public float getCacheHitPercentage()Description copied from interface:JCacheStatisticsMXBeanCache hit percentage (0.0–100.0).- Specified by:
getCacheHitPercentagein interfaceJCacheStatisticsMXBean
-
getCacheMissPercentage
public float getCacheMissPercentage()Description copied from interface:JCacheStatisticsMXBeanCache miss percentage (0.0–100.0).- Specified by:
getCacheMissPercentagein interfaceJCacheStatisticsMXBean
-
getAverageGetTime
public float getAverageGetTime()Description copied from interface:JCacheStatisticsMXBeanAverage time in microseconds for get operations.- Specified by:
getAverageGetTimein interfaceJCacheStatisticsMXBean
-
getAveragePutTime
public float getAveragePutTime()Description copied from interface:JCacheStatisticsMXBeanAverage time in microseconds for put operations.- Specified by:
getAveragePutTimein interfaceJCacheStatisticsMXBean
-
getAverageRemoveTime
public float getAverageRemoveTime()Description copied from interface:JCacheStatisticsMXBeanAverage time in microseconds for remove operations.- Specified by:
getAverageRemoveTimein interfaceJCacheStatisticsMXBean
-
clear
public void clear()Description copied from interface:JCacheStatisticsMXBeanClear all collected statistics.- Specified by:
clearin interfaceJCacheStatisticsMXBean
-