public final class JCacheStatisticsMXBean extends Object implements CacheStatisticsMXBean
| Constructor and Description |
|---|
JCacheStatisticsMXBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
enable(boolean enabled)
Sets whether the statistic collection is enabled.
|
float |
getAverageGetTime() |
float |
getAveragePutTime() |
float |
getAverageRemoveTime() |
long |
getCacheEvictions() |
long |
getCacheGets() |
float |
getCacheHitPercentage() |
long |
getCacheHits() |
long |
getCacheMisses() |
float |
getCacheMissPercentage() |
long |
getCachePuts() |
long |
getCacheRemovals() |
boolean |
isEnabled() |
void |
recordEvictions(@NonNegative long count)
Records cache evictions.
|
void |
recordGetTime(long durationNanos)
Records the time to execute get operations.
|
void |
recordHits(@NonNegative long count)
Records cache hits.
|
void |
recordMisses(@NonNegative long count)
Records cache misses.
|
void |
recordPuts(@NonNegative long count)
Records cache insertion and updates.
|
void |
recordPutTime(long durationNanos)
Records the time to execute put operations.
|
void |
recordRemovals(@NonNegative long count)
Records cache removals.
|
void |
recordRemoveTime(long durationNanos)
Records the time to execute remove operations.
|
public boolean isEnabled()
public void enable(boolean enabled)
enabled - whether to collect statisticspublic void clear()
clear in interface CacheStatisticsMXBeanpublic long getCacheHits()
getCacheHits in interface CacheStatisticsMXBeanpublic float getCacheHitPercentage()
getCacheHitPercentage in interface CacheStatisticsMXBeanpublic void recordHits(@NonNegative long count)
count - the number of hits to recordpublic long getCacheMisses()
getCacheMisses in interface CacheStatisticsMXBeanpublic float getCacheMissPercentage()
getCacheMissPercentage in interface CacheStatisticsMXBeanpublic void recordMisses(@NonNegative long count)
count - the number of misses to recordpublic long getCacheGets()
getCacheGets in interface CacheStatisticsMXBeanpublic long getCachePuts()
getCachePuts in interface CacheStatisticsMXBeanpublic void recordPuts(@NonNegative long count)
count - the number of writes to recordpublic long getCacheRemovals()
getCacheRemovals in interface CacheStatisticsMXBeanpublic void recordRemovals(@NonNegative long count)
count - the number of removals to recordpublic long getCacheEvictions()
getCacheEvictions in interface CacheStatisticsMXBeanpublic void recordEvictions(@NonNegative long count)
count - the number of evictions to recordpublic float getAverageGetTime()
getAverageGetTime in interface CacheStatisticsMXBeanpublic void recordGetTime(long durationNanos)
durationNanos - the amount of time in nanosecondspublic float getAveragePutTime()
getAveragePutTime in interface CacheStatisticsMXBeanpublic void recordPutTime(long durationNanos)
durationNanos - the amount of time in nanosecondspublic float getAverageRemoveTime()
getAverageRemoveTime in interface CacheStatisticsMXBeanpublic void recordRemoveTime(long durationNanos)
durationNanos - the amount of time in nanoseconds