Class CacheStatisticsManager
java.lang.Object
com.loomcache.server.jcache.CacheStatisticsManager
Tracks cache statistics including hits, misses, puts, removals, and evictions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordStatistics snapshot record. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleGet average get latency in milliseconds.doubleGet average put latency in milliseconds.longGet eviction count.doubleGet hit rate percentage.longgetHits()Get hit count.longGet miss count.longgetPuts()Get put count.longGet removal count.Get current statistics snapshot.voidRecord an eviction.voidrecordGet(long latencyMs) Record a get operation with latency.voidRecord a cache hit.voidRecord a cache miss.voidRecord a put operation.voidrecordPut(long latencyMs) Record a put operation with latency.voidRecord a removal.voidreset()Reset all statistics.
-
Constructor Details
-
CacheStatisticsManager
public CacheStatisticsManager()
-
-
Method Details
-
recordHit
public void recordHit()Record a cache hit. -
recordMiss
public void recordMiss()Record a cache miss. -
recordPut
public void recordPut()Record a put operation. -
recordPut
public void recordPut(long latencyMs) Record a put operation with latency. -
recordGet
public void recordGet(long latencyMs) Record a get operation with latency. -
recordRemoval
public void recordRemoval()Record a removal. -
recordEviction
public void recordEviction()Record an eviction. -
getSnapshot
Get current statistics snapshot. -
reset
public void reset()Reset all statistics. -
getHits
public long getHits()Get hit count. -
getMisses
public long getMisses()Get miss count. -
getPuts
public long getPuts()Get put count. -
getRemovals
public long getRemovals()Get removal count. -
getEvictions
public long getEvictions()Get eviction count. -
getHitRatePercentage
public double getHitRatePercentage()Get hit rate percentage. -
getAverageGetLatencyMs
public double getAverageGetLatencyMs()Get average get latency in milliseconds. -
getAveragePutLatencyMs
public double getAveragePutLatencyMs()Get average put latency in milliseconds.
-