Class LRUMap<K,V>
java.lang.Object
org.apache.commons.jcs3.utils.struct.AbstractLRUMap<K,V>
org.apache.commons.jcs3.utils.struct.LRUMap<K,V>
- Type Parameters:
K
-V
-
- All Implemented Interfaces:
Map<K,
V>
- Direct Known Subclasses:
BlockDiskKeyStore.LRUMapCountLimited
,IndexedDiskCache.LRUMapCountLimited
Simple LRUMap implementation that keeps the number of the objects below or equal maxObjects
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.commons.jcs3.utils.struct.AbstractLRUMap
clear, containsKey, containsValue, dumpCacheEntries, dumpMap, entrySet, get, getQuiet, getStatistics, isEmpty, keySet, processRemovedLRU, put, putAll, remove, size, values, verifyCache
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
LRUMap
public LRUMap() -
LRUMap
- Parameters:
maxObjects
- maximum number to keep in the map
-
-
Method Details
-
shouldRemove
- Specified by:
shouldRemove
in classAbstractLRUMap<K,
V>
-