Class CacheStats

  • All Implemented Interfaces:
    javax.management.DynamicMBean, javax.management.MBeanRegistration, CacheStatsMBean

    @Deprecated(since="2022-12-01")
    public class CacheStats
    extends AbstractCacheStats
    Deprecated.
    The Jackrabbit Oak Cache library is designed for Oak-internal use only and thus deprecated. It will not be part of the AEM SDK after April 2023.
    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)
        Deprecated.
        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

      • getElementCount

        public long getElementCount()
        Deprecated.
        Description copied from interface: CacheStatsMBean
        Get the number of elements/objects in the cache.
        Returns:
        the number of elements
      • 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
        Returns:
        to weight of the cache
      • getMaxTotalWeight

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