public class CacheStats extends AbstractCacheStats
TYPE| Constructor and Description |
|---|
CacheStats(@NotNull com.google.common.cache.Cache<?,?> cache,
@NotNull java.lang.String name,
@Nullable com.google.common.cache.Weigher<?,?> weigher,
long maxWeight)
Construct the cache stats object.
|
| Modifier and Type | Method and Description |
|---|---|
long |
estimateCurrentWeight()
Total weight of the complete cache.
|
long |
getElementCount()
Get the number of elements/objects in the cache.
|
long |
getMaxTotalWeight()
The maximum weight of entries the cache may contain.
|
cacheInfoAsString, getAverageLoadPenalty, getEvictionCount, getHitCount, getHitRate, getLoadCount, getLoadExceptionCount, getLoadExceptionRate, getLoadSuccessCount, getMissCount, getMissRate, getName, getRequestCount, getTotalLoadTime, resetStats, timeInWordspublic CacheStats(@NotNull
@NotNull com.google.common.cache.Cache<?,?> cache,
@NotNull
@NotNull java.lang.String name,
@Nullable
@Nullable com.google.common.cache.Weigher<?,?> weigher,
long maxWeight)
cache - the cachename - the name of the cacheweigher - the weigher used to estimate the current weightmaxWeight - the maximum weightpublic long getElementCount()
CacheStatsMBeanpublic long estimateCurrentWeight()
CacheStatsMBeanpublic long getMaxTotalWeight()
CacheStatsMBeanCopyright © 2010 - 2023 Adobe. All Rights Reserved