Class CacheStatisticsImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> classNames()
      Returns the types that are known to this cache being tracked.
      void disable()
      Disable statistics collection.
      void enable()
      SPI implementation
      long getHitCount()
      Gets number of total read requests that has been found in cache since last reset.
      long getHitCount​(java.lang.Class<?> c)
      Gets number of total read requests that has been found in cache for the given class since last reset.
      long getHitCount​(java.lang.String str)
      Gets number of total read requests that has been found in cache for the given class since last reset.
      long getReadCount()
      Gets number of total read requests since last reset.
      long getReadCount​(java.lang.Class<?> c)
      Gets number of total read requests for the given class since last reset.
      long getReadCount​(java.lang.String str)
      Gets number of total read requests for the given class since last reset.
      long getTotalHitCount()
      Gets number of total read requests that has been found in cache since start.
      long getTotalHitCount​(java.lang.Class<?> c)
      Gets number of total read requests that has been found in cache for the given class since start.
      long getTotalHitCount​(java.lang.String str)
      Gets number of total read requests that has been found in cache for the given class since start.
      long getTotalReadCount()
      Gets number of total read requests since start.
      long getTotalReadCount​(java.lang.Class<?> c)
      Gets number of total read requests for the given class since start.
      long getTotalReadCount​(java.lang.String str)
      Gets number of total read requests for the given class since start.
      long getTotalWriteCount()
      Gets number of total write requests since start.
      long getTotalWriteCount​(java.lang.Class<?> c)
      Gets number of total write requests for the given class since start.
      long getTotalWriteCount​(java.lang.String str)
      Gets number of total write requests for the given class since start.
      long getWriteCount()
      Gets number of total write requests since last reset.
      long getWriteCount​(java.lang.Class<?> c)
      Gets number of total write requests for the given class since last reset.
      long getWriteCount​(java.lang.String str)
      Gets number of total write requests for the given class since last reset.
      boolean isEnabled()
      Returns whether or not statistics will be collected.
      void newGet​(java.lang.Class<?> cls, boolean hit)
      Record a new cache get.
      void newGet​(java.lang.Object oid, boolean hit)  
      void newPut​(java.lang.Class<?> cls)
      Record a new cache put.
      void newPut​(java.lang.Object oid)  
      void reset()
      Clears all accumulated statistics.
      java.util.Date since()
      Gets the time of last reset.
      java.util.Date start()
      Gets the time of start.
      java.util.Map<java.lang.String,​long[]> toMap()  
      • Methods inherited from class java.lang.Object

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

      • CacheStatisticsImpl

        public CacheStatisticsImpl()
    • Method Detail

      • getHitCount

        public long getHitCount()
        Description copied from interface: CacheStatistics
        Gets number of total read requests that has been found in cache since last reset.
        Specified by:
        getHitCount in interface CacheStatistics
      • getTotalHitCount

        public long getTotalHitCount()
        Description copied from interface: CacheStatistics
        Gets number of total read requests that has been found in cache since start.
        Specified by:
        getTotalHitCount in interface CacheStatistics
      • getReadCount

        public long getReadCount​(java.lang.Class<?> c)
        Description copied from interface: CacheStatistics
        Gets number of total read requests for the given class since last reset.
        Specified by:
        getReadCount in interface CacheStatistics
      • getReadCount

        public long getReadCount​(java.lang.String str)
        Description copied from interface: CacheStatistics
        Gets number of total read requests for the given class since last reset.
        Specified by:
        getReadCount in interface CacheStatistics
      • getHitCount

        public long getHitCount​(java.lang.Class<?> c)
        Description copied from interface: CacheStatistics
        Gets number of total read requests that has been found in cache for the given class since last reset.
        Specified by:
        getHitCount in interface CacheStatistics
      • getHitCount

        public long getHitCount​(java.lang.String str)
        Description copied from interface: CacheStatistics
        Gets number of total read requests that has been found in cache for the given class since last reset.
        Specified by:
        getHitCount in interface CacheStatistics
      • getWriteCount

        public long getWriteCount​(java.lang.Class<?> c)
        Description copied from interface: CacheStatistics
        Gets number of total write requests for the given class since last reset.
        Specified by:
        getWriteCount in interface CacheStatistics
      • getWriteCount

        public long getWriteCount​(java.lang.String str)
        Description copied from interface: CacheStatistics
        Gets number of total write requests for the given class since last reset.
        Specified by:
        getWriteCount in interface CacheStatistics
      • getTotalReadCount

        public long getTotalReadCount​(java.lang.Class<?> c)
        Description copied from interface: CacheStatistics
        Gets number of total read requests for the given class since start.
        Specified by:
        getTotalReadCount in interface CacheStatistics
      • getTotalReadCount

        public long getTotalReadCount​(java.lang.String str)
        Description copied from interface: CacheStatistics
        Gets number of total read requests for the given class since start.
        Specified by:
        getTotalReadCount in interface CacheStatistics
      • getTotalHitCount

        public long getTotalHitCount​(java.lang.Class<?> c)
        Description copied from interface: CacheStatistics
        Gets number of total read requests that has been found in cache for the given class since start.
        Specified by:
        getTotalHitCount in interface CacheStatistics
      • getTotalHitCount

        public long getTotalHitCount​(java.lang.String str)
        Description copied from interface: CacheStatistics
        Gets number of total read requests that has been found in cache for the given class since start.
        Specified by:
        getTotalHitCount in interface CacheStatistics
      • getTotalWriteCount

        public long getTotalWriteCount​(java.lang.Class<?> c)
        Description copied from interface: CacheStatistics
        Gets number of total write requests for the given class since start.
        Specified by:
        getTotalWriteCount in interface CacheStatistics
      • getTotalWriteCount

        public long getTotalWriteCount​(java.lang.String str)
        Description copied from interface: CacheStatistics
        Gets number of total write requests for the given class since start.
        Specified by:
        getTotalWriteCount in interface CacheStatistics
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: CacheStatistics
        Returns whether or not statistics will be collected.
        Specified by:
        isEnabled in interface CacheStatistics
      • classNames

        public java.util.Set<java.lang.String> classNames()
        Description copied from interface: CacheStatistics
        Returns the types that are known to this cache being tracked.
        Specified by:
        classNames in interface CacheStatistics
      • toMap

        public java.util.Map<java.lang.String,​long[]> toMap()
        Specified by:
        toMap in interface CacheStatistics
      • newGet

        public void newGet​(java.lang.Class<?> cls,
                           boolean hit)
        Description copied from interface: CacheStatisticsSPI
        Record a new cache get.
        Specified by:
        newGet in interface CacheStatisticsSPI
        Parameters:
        cls - - The class describing the type that is contained in the cache.
        hit - - true for a cache hit, false otherwise
      • newGet

        public void newGet​(java.lang.Object oid,
                           boolean hit)
      • newPut

        public void newPut​(java.lang.Class<?> cls)
        Description copied from interface: CacheStatisticsSPI
        Record a new cache put.
        Specified by:
        newPut in interface CacheStatisticsSPI
        Parameters:
        cls - - The class describing the type that is contained in the cache.
      • newPut

        public void newPut​(java.lang.Object oid)