Class CacheStatisticsManager

java.lang.Object
com.loomcache.server.jcache.CacheStatisticsManager

public class CacheStatisticsManager extends Object
Tracks cache statistics including hits, misses, puts, removals, and evictions.
  • 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.