Package com.esri.ges.util
Class LRUCache<LV>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<String,LV>
-
- com.esri.ges.util.LRUCache<LV>
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,LV>
public class LRUCache<LV> extends LinkedHashMap<String,LV>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
LRUCache.Remover<E>
-
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
Constructors Constructor Description LRUCache(int maxEntries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LV
put(String key, LV value)
protected boolean
removeEldestEntry(Map.Entry<String,LV> eldest)
void
setRemover(LRUCache.Remover<Map.Entry<String,LV>> remover)
-
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, 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, putAll, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Method Detail
-
setRemover
public void setRemover(LRUCache.Remover<Map.Entry<String,LV>> remover)
-
removeEldestEntry
protected boolean removeEldestEntry(Map.Entry<String,LV> eldest)
- Overrides:
removeEldestEntry
in classLinkedHashMap<String,LV>
-
-