Interface JCacheStatisticsMXBean
- All Known Implementing Classes:
JCacheStatisticsMXBeanImpl
JMX management interface for per-cache statistics.
Exposes cache hit/miss/put/removal/eviction counts and derived metrics
(hit percentage, average latencies). Attribute names follow the JSR-107
CacheStatisticsMXBean convention for compatibility with JMX tools.
Registered under ObjectName:
javax.cache:type=CacheStatistics,CacheManager=<uri>,Cache=<name>
- Since:
- 2.0
-
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.
-
Method Details
-
getCacheHits
long getCacheHits()Total number of cache hits. -
getCacheMisses
long getCacheMisses()Total number of cache misses. -
getCacheGets
long getCacheGets()Total number of gets (hits + misses). -
getCachePuts
long getCachePuts()Total number of puts. -
getCacheRemovals
long getCacheRemovals()Total number of removals. -
getCacheEvictions
long getCacheEvictions()Total number of evictions. -
getCacheHitPercentage
float getCacheHitPercentage()Cache hit percentage (0.0–100.0). -
getCacheMissPercentage
float getCacheMissPercentage()Cache miss percentage (0.0–100.0). -
getAverageGetTime
float getAverageGetTime()Average time in microseconds for get operations. -
getAveragePutTime
float getAveragePutTime()Average time in microseconds for put operations. -
getAverageRemoveTime
float getAverageRemoveTime()Average time in microseconds for remove operations. -
clear
void clear()Clear all collected statistics.
-