Class DebugCacheStatistics<T extends org.springframework.cache.Cache>
java.lang.Object
com.foreach.across.modules.debugweb.events.DebugCacheStatistics<T>
- All Implemented Interfaces:
org.springframework.core.ResolvableTypeProvider
public class DebugCacheStatistics<T extends org.springframework.cache.Cache>
extends Object
implements org.springframework.core.ResolvableTypeProvider
Published when general statistics for a
Cache are to be gathered.- Since:
- 3.0.0
- Author:
- Arne Vandamme
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a single entry in the cache.static classHelper which takes an original entry iterator and transforms it into aDebugCacheStatistics.CacheEntrywhen the entry is requested. -
Constructor Summary
ConstructorsConstructorDescriptionDebugCacheStatistics(String cacheName, org.springframework.cache.Cache cache) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.cache.CachegetCache()AnIterableto the entries of the cache.getGets()getHits()getItems()Number of items present in the cache.Maximum number of items that can be stored in the cache.getPuts()org.springframework.core.ResolvableTypevoidsetAverageGetTime(Float averageGetTime) voidsetAveragePutTime(Float averagePutTime) voidsetAverageRemoveTime(Float averageRemoveTime) voidsetCacheEntries(Iterable<DebugCacheStatistics.CacheEntry> cacheEntries) AnIterableto the entries of the cache.<V> voidsetCacheEntryIterator(@NonNull Iterable<V> original, @NonNull Function<V, DebugCacheStatistics.CacheEntry> transformFunction) Short-hand for providing a cache entry iterator by transforming original entries into aDebugCacheStatistics.CacheEntrywhenever they are requested.voidsetEvictions(Long evictions) voidvoidsetHitPercentage(Float hitPercentage) voidvoidNumber of items present in the cache.voidsetMaxItems(Long maxItems) Maximum number of items that can be stored in the cache.voidvoidsetMissPercentage(Float missPercentage) voidvoidsetRemovals(Long removals)
-
Constructor Details
-
DebugCacheStatistics
-
-
Method Details
-
setCacheEntryIterator
public <V> void setCacheEntryIterator(@NonNull @NonNull Iterable<V> original, @NonNull @NonNull Function<V, DebugCacheStatistics.CacheEntry> transformFunction) Short-hand for providing a cache entry iterator by transforming original entries into aDebugCacheStatistics.CacheEntrywhenever they are requested. -
getResolvableType
public org.springframework.core.ResolvableType getResolvableType()- Specified by:
getResolvableTypein interfaceorg.springframework.core.ResolvableTypeProvider
-
getCacheName
-
getCache
public org.springframework.cache.Cache getCache() -
getItems
Number of items present in the cache. -
getMaxItems
Maximum number of items that can be stored in the cache. -
getHits
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCacheHits()
-
getHitPercentage
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCacheHitPercentage()
-
getMisses
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCacheMisses()
-
getMissPercentage
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCacheMissPercentage()
-
getGets
- See Also:
-
()
-
getPuts
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCachePuts()
-
getRemovals
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCacheRemovals()
-
getEvictions
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCacheEvictions()
-
getAverageGetTime
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getAverageGetTime()
-
getAveragePutTime
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getAveragePutTime()
-
getAverageRemoveTime
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getAverageRemoveTime()
-
getCacheEntries
AnIterableto the entries of the cache. Can benullif details are not available. If you want to have lazy transformation of an original cache entry (for performance reasons you often do), you can usesetCacheEntryIterator(Iterable, Function). -
setItems
Number of items present in the cache. -
setMaxItems
Maximum number of items that can be stored in the cache. -
setHits
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCacheHits()
-
setHitPercentage
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCacheHitPercentage()
-
setMisses
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCacheMisses()
-
setMissPercentage
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCacheMissPercentage()
-
setGets
- See Also:
-
()
-
setPuts
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCachePuts()
-
setRemovals
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCacheRemovals()
-
setEvictions
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getCacheEvictions()
-
setAverageGetTime
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getAverageGetTime()
-
setAveragePutTime
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getAveragePutTime()
-
setAverageRemoveTime
- See Also:
-
javax.cache.management.CacheStatisticsMXBean#getAverageRemoveTime()
-
setCacheEntries
AnIterableto the entries of the cache. Can benullif details are not available. If you want to have lazy transformation of an original cache entry (for performance reasons you often do), you can usesetCacheEntryIterator(Iterable, Function).
-