Class CacheStatistics

  • All Implemented Interfaces:
    CacheStatisticsEntry, java.lang.Comparable<java.lang.Object>

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

      Constructors 
      Constructor Description
      CacheStatistics()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clears all cache statistics.
      Method is thread safe but this method is not performed atomically.
      int compareTo​(java.lang.Object object)
      FIXME: check me
      void evicted​(java.lang.Object typeCode)
      increments evict count for specified type code
      void fetched​(java.lang.Object typeCode)
      increments load/compute count for specified type code
      long getEvictions()
      returns eviction counter for all types
      long getEvictions​(java.lang.Object typeCode)  
      int getFactor()  
      int getFactor​(java.lang.Object typeCode)  
      long getFetches()
      How many db loads / computes performed
      long getFetches​(java.lang.Object typeCode)  
      long getHitCount()  
      long getHits()
      returns hit counter for all types
      long getHits​(java.lang.Object typeCode)  
      long getInstanceCount()  
      long getInstanceCount​(java.lang.Object typeCode)  
      long getInvalidations()
      returns invalidation counter for all types
      long getInvalidations​(java.lang.Object typeCode)  
      java.lang.String getKeyString()  
      long getMissCount()  
      long getMisses()
      returns miss counter for all types
      long getMisses​(java.lang.Object typeCode)  
      java.util.Collection<java.lang.Object> getTypes()
      returns all type codes used in this statistics holder
      void hit​(java.lang.Object typeCode)
      increments hit count for specified type code
      void invalidated​(java.lang.Object typeCode)
      increments invalidate count for specified type code
      void missed​(java.lang.Object typeCode)
      increments miss count for specified type code
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CacheStatistics

        public CacheStatistics()
    • Method Detail

      • hit

        public void hit​(java.lang.Object typeCode)
        increments hit count for specified type code
      • fetched

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

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

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

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

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

        public long getHits​(java.lang.Object typeCode)
      • getFetches

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

        public long getFetches​(java.lang.Object typeCode)
      • getMisses

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

        public long getMisses​(java.lang.Object typeCode)
      • getEvictions

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

        public long getEvictions​(java.lang.Object typeCode)
      • getInvalidations

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

        public long getInvalidations​(java.lang.Object typeCode)
      • getInstanceCount

        public long getInstanceCount()
      • getInstanceCount

        public long getInstanceCount​(java.lang.Object typeCode)
      • getTypes

        public java.util.Collection<java.lang.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.
      • getFactor

        public int getFactor​(java.lang.Object typeCode)
      • compareTo

        public int compareTo​(java.lang.Object object)
        FIXME: check me
        Specified by:
        compareTo in interface java.lang.Comparable<java.lang.Object>