public class EfficientLRUMap<K,V> extends Object implements Map<K,V>
| Constructor and Description |
|---|
EfficientLRUMap(int maxEntries) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
protected Class |
getUnderlyingMapClass() |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
protected void |
resetInternalMap()
We are clearing the map, so we can switch back to a
ConcurrentHashMap |
int |
size() |
protected boolean |
switchToLRUMap() |
Collection<V> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>protected boolean switchToLRUMap()
protected void resetInternalMap()
ConcurrentHashMapprotected Class getUnderlyingMapClass()
Copyright © 2022. All rights reserved.