Class CacheStatistics

java.lang.Object
de.hybris.platform.regioncache.CacheStatistics
All Implemented Interfaces:
CacheStatisticsEntry, Comparable<Object>

public class CacheStatistics extends Object implements CacheStatisticsEntry, Comparable<Object>
Class keeps statistics for single cache region. Statistics are available for each type code used.
Available statistics:
  • hits
  • fetches
  • misses
  • evictions
  • invalidations
  • Constructor Details

    • CacheStatistics

      public CacheStatistics()
  • Method Details

    • hit

      public void hit(Object typeCode)
      increments hit count for specified type code
    • fetched

      public void fetched(Object typeCode)
      increments load/compute count for specified type code
    • missed

      public void missed(Object typeCode)
      increments miss count for specified type code
    • evicted

      public void evicted(Object typeCode)
      increments evict count for specified type code
    • invalidated

      public void invalidated(Object typeCode)
      increments invalidate count for specified type code
    • getHits

      public long getHits()
      returns hit counter for all types
    • getHits

      public long getHits(Object typeCode)
    • getFetches

      public long getFetches()
      How many db loads / computes performed
    • getFetches

      public long getFetches(Object typeCode)
    • getMisses

      public long getMisses()
      returns miss counter for all types
    • getMisses

      public long getMisses(Object typeCode)
    • getEvictions

      public long getEvictions()
      returns eviction counter for all types
    • getEvictions

      public long getEvictions(Object typeCode)
    • getInvalidations

      public long getInvalidations()
      returns invalidation counter for all types
    • getInvalidations

      public long getInvalidations(Object typeCode)
    • getInstanceCount

      public long getInstanceCount()
    • getInstanceCount

      public long getInstanceCount(Object typeCode)
    • getTypes

      public Collection<Object> getTypes()
      returns all type codes used in this statistics holder
    • clear

      public void clear()
      Clears all cache statistics.
      Method is thread safe but this method is not performed atomically.
    • getKeyString

      public String getKeyString()
      Specified by:
      getKeyString in interface CacheStatisticsEntry
    • getHitCount

      public long getHitCount()
      Specified by:
      getHitCount in interface CacheStatisticsEntry
    • getMissCount

      public long getMissCount()
      Specified by:
      getMissCount in interface CacheStatisticsEntry
    • getFactor

      public int getFactor()
      Specified by:
      getFactor in interface CacheStatisticsEntry
    • getFactor

      public int getFactor(Object typeCode)
    • compareTo

      public int compareTo(Object object)
      Specified by:
      compareTo in interface Comparable<Object>