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 booleanremoveEldestEntry(Map.Entry<K, MemoryElementDescriptor<K, V>> eldest) Remove eldest.Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
removeEldestEntryin classLinkedHashMap<K,MemoryElementDescriptor<K, V>> - Parameters:
eldest-- Returns:
- true if removed
-