Package com.helger.commons.cache
Class Cache<KEYTYPE,VALUETYPE>
- java.lang.Object
-
- com.helger.commons.cache.MappedCache<KEYTYPE,KEYTYPE,VALUETYPE>
-
- com.helger.commons.cache.Cache<KEYTYPE,VALUETYPE>
-
- Type Parameters:
KEYTYPE- The cache key typeVALUETYPE- The cache value type
- All Implemented Interfaces:
ICache<KEYTYPE,VALUETYPE>,IMutableCache<KEYTYPE,VALUETYPE>,IHasSize,IHasName
- Direct Known Subclasses:
DateTimeFormatterCache,PDTFormatter.LocalizedDateFormatCache,RegExCache
@ThreadSafe public class Cache<KEYTYPE,VALUETYPE> extends MappedCache<KEYTYPE,KEYTYPE,VALUETYPE>
The default implementation ofICacheandIMutableCache. Since v9.3.8 this class is based onMappedCache.- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_ALLOW_NULL_VALUES-
Fields inherited from class com.helger.commons.cache.MappedCache
m_aRWLock, NO_MAX_SIZE, STATISTICS_PREFIX
-
-
Constructor Summary
Constructors Constructor Description Cache(Function<KEYTYPE,VALUETYPE> aCacheValueProvider, int nMaxSize, String sCacheName)Cache(Function<KEYTYPE,VALUETYPE> aCacheValueProvider, int nMaxSize, String sCacheName, boolean bAllowNullValues)Cache(Function<KEYTYPE,VALUETYPE> aCacheValueProvider, String sCacheName)
-
Method Summary
-
Methods inherited from class com.helger.commons.cache.MappedCache
clearCache, createCache, getCacheKeyProvider, getFromCache, getFromCacheNoStats, getFromCacheNoStatsNotLocked, getMaxSize, getName, getValueProvider, hasMaxSize, isAllowNullValues, isEmpty, isInCache, isNotEmpty, putInCache, putInCacheNotLocked, removeFromCache, size, toString
-
-
-
-
Field Detail
-
DEFAULT_ALLOW_NULL_VALUES
public static final boolean DEFAULT_ALLOW_NULL_VALUES
- See Also:
- Constant Field Values
-
-