Class LHMLRUMemoryCache.LHMSpooler
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,MemoryElementDescriptor<K,V>>
org.apache.commons.jcs3.engine.memory.lru.LHMLRUMemoryCache.LHMSpooler
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<K,
MemoryElementDescriptor<K, V>>
- Enclosing class:
- LHMLRUMemoryCache<K,
V>
Implementation of removeEldestEntry in LinkedHashMap
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionInitialize to a small size--for now, 1/2 of max 3rd variable "true" indicates that it should be access and not time governed. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
removeEldestEntry
(Map.Entry<K, MemoryElementDescriptor<K, V>> eldest) Remove eldest.Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, values
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Constructor Details
-
LHMSpooler
public LHMSpooler()Initialize to a small size--for now, 1/2 of max 3rd variable "true" indicates that it should be access and not time governed. This could be configurable.
-
-
Method Details
-
removeEldestEntry
Remove eldest. Automatically called by LinkedHashMap.- Overrides:
removeEldestEntry
in classLinkedHashMap<K,
MemoryElementDescriptor<K, V>> - Parameters:
eldest
-- Returns:
- true if removed
-