public class NConcurrentReadWriteLRUMap<K,V> extends LinkedHashMap<K,V> implements NCappedMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
NConcurrentReadWriteLRUMap(int maxSize)
N concurrent read write lru map.
|
| Modifier and Type | Method and Description |
|---|---|
V |
get(Object key) |
V |
getOrDefault(Object key,
V defaultValue)
Returns the or default.
|
int |
maxEntries() |
V |
put(K key,
V value) |
protected boolean |
removeEldestEntry(Map.Entry eldest) |
void |
resize(int maxEntries) |
clear, containsValue, entrySet, forEach, keySet, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitclear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, hashCode, isEmpty, keySet, merge, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuespublic NConcurrentReadWriteLRUMap(int maxSize)
maxSize - max sizepublic V getOrDefault(Object key, V defaultValue)
getOrDefault in interface Map<K,V>getOrDefault in class LinkedHashMap<K,V>key - keydefaultValue - default valueprotected boolean removeEldestEntry(Map.Entry eldest)
removeEldestEntry in class LinkedHashMap<K,V>public void resize(int maxEntries)
resize in interface NCappedMap<K,V>public int maxEntries()
maxEntries in interface NCappedMap<K,V>Copyright © 2026 vpc open source initiative. All rights reserved.