Class CacheStatsMBeanWrapper

java.lang.Object
org.apache.jackrabbit.oak.cache.CacheStatsMBeanWrapper
All Implemented Interfaces:
CacheStatsMBean

@Deprecated(since="2022-12-01") public class CacheStatsMBeanWrapper extends Object implements CacheStatsMBean
Deprecated.
  • Field Summary

    Fields inherited from interface org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean

    TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    Gathers the stats of the cache for logging.
    long
    Deprecated.
    Total weight of the complete cache.
    double
    Deprecated.
    Returns the average time spent loading new values.
    long
    Deprecated.
    Get the number of elements/objects in the cache.
    long
    Deprecated.
    Returns the number of times an entry has been evicted.
    long
    Deprecated.
    Returns the number of times org.apache.jackrabbit.guava.common.cache.Cache lookup methods have returned a cached value.
    double
    Deprecated.
    Returns the ratio of cache requests which were hits.
    long
    Deprecated.
    Returns the total number of times that org.apache.jackrabbit.guava.common.cache.Cache lookup methods attempted to load new values.
    long
    Deprecated.
    Returns the number of times org.apache.jackrabbit.guava.common.cache.Cache lookup methods threw an exception while loading a new value.
    double
    Deprecated.
    Returns the ratio of cache loading attempts which threw exceptions.
    long
    Deprecated.
    Returns the number of times org.apache.jackrabbit.guava.common.cache.Cache lookup methods have successfully loaded a new value.
    long
    Deprecated.
    The maximum weight of entries the cache may contain.
    long
    Deprecated.
    Returns the number of times org.apache.jackrabbit.guava.common.cache.Cache lookup methods have returned an uncached (newly loaded) value, or null.
    double
    Deprecated.
    Returns the ratio of cache requests which were misses.
    Deprecated.
     
    long
    Deprecated.
    Returns the number of times org.apache.jackrabbit.guava.common.cache.Cache lookup methods have returned either a cached or uncached value.
    long
    Deprecated.
    Returns the total number of nanoseconds the cache has spent loading new values.
    void
    Deprecated.
    Reset the cache stats

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CacheStatsMBeanWrapper

      public CacheStatsMBeanWrapper(CacheStatsMBean delegate)
      Deprecated.
  • Method Details

    • getName

      public String getName()
      Deprecated.
      Specified by:
      getName in interface CacheStatsMBean
    • getRequestCount

      public long getRequestCount()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Returns the number of times org.apache.jackrabbit.guava.common.cache.Cache lookup methods have returned either a cached or uncached value. This is defined as getHitCount + getMissCount.
      Specified by:
      getRequestCount in interface CacheStatsMBean
    • getHitCount

      public long getHitCount()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Returns the number of times org.apache.jackrabbit.guava.common.cache.Cache lookup methods have returned a cached value.
      Specified by:
      getHitCount in interface CacheStatsMBean
    • getHitRate

      public double getHitRate()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Returns the ratio of cache requests which were hits. This is defined as getHitCount / getRequestCount, or 1.0 when getRequestCount == 0. Note that getHitRate + getMissRate =~ 1.0.
      Specified by:
      getHitRate in interface CacheStatsMBean
    • getMissCount

      public long getMissCount()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Returns the number of times org.apache.jackrabbit.guava.common.cache.Cache lookup methods have returned an uncached (newly loaded) value, or null. Multiple concurrent calls to org.apache.jackrabbit.guava.common.cache.Cache lookup methods on an absent value can result in multiple misses, all returning the results of a single cache load operation.
      Specified by:
      getMissCount in interface CacheStatsMBean
    • getMissRate

      public double getMissRate()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Returns the ratio of cache requests which were misses. This is defined as getMissCount / getRequestCount, or 0.0 when getRequestCount == 0. Note that getHitRate + getMissRate =~ 1.0. Cache misses include all requests which weren't cache hits, including requests which resulted in either successful or failed loading attempts, and requests which waited for other threads to finish loading. It is thus the case that getMissCount >= getLoadSuccessCount + getLoadExceptionCount. Multiple concurrent misses for the same key will result in a single load operation.
      Specified by:
      getMissRate in interface CacheStatsMBean
    • getLoadCount

      public long getLoadCount()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Returns the total number of times that org.apache.jackrabbit.guava.common.cache.Cache lookup methods attempted to load new values. This includes both successful load operations, as well as those that threw exceptions. This is defined as getLoadSuccessCount + getLoadExceptionCount.
      Specified by:
      getLoadCount in interface CacheStatsMBean
    • getLoadSuccessCount

      public long getLoadSuccessCount()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Returns the number of times org.apache.jackrabbit.guava.common.cache.Cache lookup methods have successfully loaded a new value. This is always incremented in conjunction with CacheStatsMBean.getMissCount(), though getMissCount is also incremented when an exception is encountered during cache loading (see CacheStatsMBean.getLoadExceptionCount()). Multiple concurrent misses for the same key will result in a single load operation.
      Specified by:
      getLoadSuccessCount in interface CacheStatsMBean
    • getLoadExceptionCount

      public long getLoadExceptionCount()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Returns the number of times org.apache.jackrabbit.guava.common.cache.Cache lookup methods threw an exception while loading a new value. This is always incremented in conjunction with getMissCount, though getMissCount is also incremented when cache loading completes successfully (see CacheStatsMBean.getLoadSuccessCount()). Multiple concurrent misses for the same key will result in a single load operation.
      Specified by:
      getLoadExceptionCount in interface CacheStatsMBean
    • getLoadExceptionRate

      public double getLoadExceptionRate()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Returns the ratio of cache loading attempts which threw exceptions. This is defined as getLoadExceptionCount / (getLoadSuccessCount + getLoadExceptionCount), or 0.0 when getLoadSuccessCount + getLoadExceptionCount == 0.
      Specified by:
      getLoadExceptionRate in interface CacheStatsMBean
    • getTotalLoadTime

      public long getTotalLoadTime()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Returns the total number of nanoseconds the cache has spent loading new values. This can be used to calculate the miss penalty. This value is increased every time getLoadSuccessCount or getLoadExceptionCount is incremented.
      Specified by:
      getTotalLoadTime in interface CacheStatsMBean
    • getAverageLoadPenalty

      public double getAverageLoadPenalty()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Returns the average time spent loading new values. This is defined as getTotalLoadTime / (getLoadSuccessCount + getLoadExceptionCount).
      Specified by:
      getAverageLoadPenalty in interface CacheStatsMBean
    • getEvictionCount

      public long getEvictionCount()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Returns the number of times an entry has been evicted. This count does not include manual org.apache.jackrabbit.guava.common.cache.Cache#invalidate invalidations.
      Specified by:
      getEvictionCount in interface CacheStatsMBean
    • getElementCount

      public long getElementCount()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Get the number of elements/objects in the cache.
      Specified by:
      getElementCount in interface CacheStatsMBean
      Returns:
      the number of elements
    • getMaxTotalWeight

      public long getMaxTotalWeight()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      The maximum weight of entries the cache may contain.
      Specified by:
      getMaxTotalWeight in interface CacheStatsMBean
      Returns:
      the maximum total weight of entries the cache may contain
    • estimateCurrentWeight

      public long estimateCurrentWeight()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Total weight of the complete cache. Depending on implementation it might be the amount of RAM taken by the cache
      Specified by:
      estimateCurrentWeight in interface CacheStatsMBean
      Returns:
      to weight of the cache
    • cacheInfoAsString

      public String cacheInfoAsString()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Gathers the stats of the cache for logging.
      Specified by:
      cacheInfoAsString in interface CacheStatsMBean
    • resetStats

      public void resetStats()
      Deprecated.
      Description copied from interface: CacheStatsMBean
      Reset the cache stats
      Specified by:
      resetStats in interface CacheStatsMBean