Package org.apache.jackrabbit.oak.cache
Class CacheStats
java.lang.Object
javax.management.StandardMBean
org.apache.jackrabbit.oak.commons.jmx.AnnotatedStandardMBean
org.apache.jackrabbit.oak.cache.AbstractCacheStats
org.apache.jackrabbit.oak.cache.CacheStats
- All Implemented Interfaces:
DynamicMBean,MBeanRegistration,CacheStatsMBean
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.
-
Field Summary
Fields inherited from interface org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean
TYPE -
Constructor Summary
ConstructorsConstructorDescriptionCacheStats(@NotNull org.apache.jackrabbit.guava.common.cache.Cache<?, ?> cache, @NotNull String name, @Nullable org.apache.jackrabbit.guava.common.cache.Weigher<?, ?> weigher, long maxWeight) Deprecated.Construct the cache stats object. -
Method Summary
Modifier and TypeMethodDescriptionlongDeprecated.Total weight of the complete cache.longDeprecated.Get the number of elements/objects in the cache.longDeprecated.The maximum weight of entries the cache may contain.Methods inherited from class org.apache.jackrabbit.oak.cache.AbstractCacheStats
cacheInfoAsString, getAverageLoadPenalty, getEvictionCount, getHitCount, getHitRate, getLoadCount, getLoadExceptionCount, getLoadExceptionRate, getLoadSuccessCount, getMissCount, getMissRate, getName, getRequestCount, getTotalLoadTime, resetStats, timeInWordsMethods inherited from class javax.management.StandardMBean
getAttribute, getAttributes, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
-
Constructor Details
-
CacheStats
public CacheStats(@NotNull @NotNull org.apache.jackrabbit.guava.common.cache.Cache<?, ?> cache, @NotNull @NotNull String name, @Nullable @Nullable org.apache.jackrabbit.guava.common.cache.Weigher<?, ?> weigher, long maxWeight) Deprecated.Construct the cache stats object.- Parameters:
cache- the cachename- the name of the cacheweigher- the weigher used to estimate the current weightmaxWeight- the maximum weight
-
-
Method Details
-
getElementCount
public long getElementCount()Deprecated.Description copied from interface:CacheStatsMBeanGet the number of elements/objects in the cache.- Returns:
- the number of elements
-
estimateCurrentWeight
public long estimateCurrentWeight()Deprecated.Description copied from interface:CacheStatsMBeanTotal 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:CacheStatsMBeanThe maximum weight of entries the cache may contain.- Returns:
- the maximum total weight of entries the cache may contain
-