public class StatisticsAwareCacheWrapper extends Object implements org.springframework.cache.Cache, com.edorasware.commons.core.cache.CacheStatistics
This class wraps a Cache and holds the statistical data to satisfy the CacheStatistics interface.
| Modifier and Type | Method and Description | 
|---|---|
void | 
clear()  | 
static StatisticsAwareCacheWrapper | 
create(org.springframework.cache.Cache wrappedCache)
Creates a new instance based on the given  
Cache. | 
void | 
evict(Object key)  | 
org.springframework.cache.Cache.ValueWrapper | 
get(Object key)  | 
<T> T | 
get(Object key,
   Callable<T> valueLoader)  | 
<T> T | 
get(Object key,
   Class<T> type)  | 
long | 
getCacheClearedCount()  | 
long | 
getCurrentEntries()  | 
double | 
getEffectiveness()  | 
long | 
getEntriesEvicted()  | 
long | 
getEntriesHit()  | 
long | 
getEntriesMissed()  | 
String | 
getName()  | 
Object | 
getNativeCache()  | 
void | 
put(Object key,
   Object value)  | 
org.springframework.cache.Cache.ValueWrapper | 
putIfAbsent(Object key,
           Object value)  | 
public static StatisticsAwareCacheWrapper create(org.springframework.cache.Cache wrappedCache)
Creates a new instance based on the given Cache.
wrappedCache - the cache for which to add statistical datapublic double getEffectiveness()
getEffectiveness in interface com.edorasware.commons.core.cache.CacheStatisticspublic long getCurrentEntries()
getCurrentEntries in interface com.edorasware.commons.core.cache.CacheStatisticspublic long getEntriesHit()
getEntriesHit in interface com.edorasware.commons.core.cache.CacheStatisticspublic long getEntriesMissed()
getEntriesMissed in interface com.edorasware.commons.core.cache.CacheStatisticspublic long getEntriesEvicted()
getEntriesEvicted in interface com.edorasware.commons.core.cache.CacheStatisticspublic long getCacheClearedCount()
getCacheClearedCount in interface com.edorasware.commons.core.cache.CacheStatisticspublic String getName()
getName in interface com.edorasware.commons.core.cache.CacheStatisticsgetName in interface org.springframework.cache.Cachepublic Object getNativeCache()
getNativeCache in interface org.springframework.cache.Cachepublic org.springframework.cache.Cache.ValueWrapper get(Object key)
get in interface org.springframework.cache.Cachepublic <T> T get(Object key, Class<T> type)
get in interface org.springframework.cache.Cachepublic <T> T get(Object key, Callable<T> valueLoader)
get in interface org.springframework.cache.Cachepublic void put(Object key, Object value)
put in interface org.springframework.cache.Cachepublic org.springframework.cache.Cache.ValueWrapper putIfAbsent(Object key, Object value)
putIfAbsent in interface org.springframework.cache.Cachepublic void evict(Object key)
evict in interface org.springframework.cache.Cachepublic void clear()
clear in interface org.springframework.cache.CacheCopyright © 2010 - 2018 edorasware ag. All Rights Reserved.