Class CacheStats

  • All Implemented Interfaces:
    javax.management.DynamicMBean, javax.management.MBeanRegistration, org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean

    public class CacheStats
    extends AbstractCacheStats
    Cache statistics.
    • Constructor Detail

      • CacheStats

        public CacheStats​(@NotNull
                          @NotNull org.apache.jackrabbit.guava.common.cache.Cache<?,​?> cache,
                          @NotNull
                          @NotNull java.lang.String name,
                          @Nullable
                          @Nullable org.apache.jackrabbit.guava.common.cache.Weigher<?,​?> weigher,
                          long maxWeight)
        Construct the cache stats object.
        Parameters:
        cache - the cache
        name - the name of the cache
        weigher - the weigher used to estimate the current weight
        maxWeight - the maximum weight
    • Method Detail

      • getCurrentStats

        protected org.apache.jackrabbit.guava.common.cache.CacheStats getCurrentStats()
        Description copied from class: AbstractCacheStats
        Call back invoked to retrieve the most recent CacheStats instance of the underlying cache.
        Specified by:
        getCurrentStats in class AbstractCacheStats
      • getElementCount

        public long getElementCount()
      • estimateCurrentWeight

        public long estimateCurrentWeight()
      • getMaxTotalWeight

        public long getMaxTotalWeight()