Class CacheStats

java.lang.Object
org.opensearch.common.cache.stats.CacheStats

public class CacheStats extends Object
A mutable class containing the 5 live metrics tracked by a StatsHolder object.
  • Constructor Details

    • CacheStats

      public CacheStats(long hits, long misses, long evictions, long sizeInBytes, long items)
    • CacheStats

      public CacheStats()
  • Method Details

    • add

      public void add(CacheStats other)
    • add

      public void add(ImmutableCacheStats snapshot)
    • subtract

      public void subtract(ImmutableCacheStats other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • incrementHits

      public void incrementHits()
    • incrementMisses

      public void incrementMisses()
    • incrementEvictions

      public void incrementEvictions()
    • incrementSizeInBytes

      public void incrementSizeInBytes(long amount)
    • decrementSizeInBytes

      public void decrementSizeInBytes(long amount)
    • incrementItems

      public void incrementItems()
    • decrementItems

      public void decrementItems()
    • getHits

      public long getHits()
    • getMisses

      public long getMisses()
    • getEvictions

      public long getEvictions()
    • getSizeInBytes

      public long getSizeInBytes()
    • getItems

      public long getItems()
    • resetSizeAndEntries

      public void resetSizeAndEntries()
    • immutableSnapshot

      public ImmutableCacheStats immutableSnapshot()