Interface CacheMap<K,V>
- All Superinterfaces:
Map<K,V>
- All Known Subinterfaces:
YFIFOMap<K,V>
- All Known Implementing Classes:
AbstractBaseCacheMap,AbstractCacheMap,BaseCacheYFastFIFOMap,BaseCacheYFastFIFOMapStub,YFastFIFOMap
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()intThe maximum size since initialization/creationintmaxSize()The maximum allowed size of the mapvoidprocessDisplacedEntry(K key, V value) do something before a entry is displaced because the map is growing to big (if an entry is added and size() is getting bigger as maxSize()), this method will be called before an old entry is being removedintsize()the current size of the cache mapMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, values
-
Method Details
-
clear
void clear() -
size
int size()the current size of the cache map -
maxSize
int maxSize()The maximum allowed size of the map -
getMaxReachedSize
int getMaxReachedSize()The maximum size since initialization/creation- Returns:
- the maximum size since initialization
-
processDisplacedEntry
do something before a entry is displaced because the map is growing to big (if an entry is added and size() is getting bigger as maxSize()), this method will be called before an old entry is being removed
-