K - the key typeV - the value typepublic class SynchronizedExpiringLinkedHashMap<K,V> extends LinkedHashMap<K,V>
LinkedHashMap with keys that expire automatically after a predetermined delay.
This class is wrapped using Collections.synchronizedMap(java.util.Map<K, V>). Iteration of this map must be done only
after acquiring a lock on the instance of this map.
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
putIfAbsent(K key,
V value) |
V |
replace(K key,
V value) |
boolean |
replace(K key,
V oldValue,
V newValue) |
void |
replaceAll(BiFunction<? super K,? super V,? extends V> function) |
containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, remove, remove, sizeequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, remove, remove, sizepublic void clear()
public V putIfAbsent(K key, V value)
putIfAbsent in interface Map<K,V>putIfAbsent in class HashMap<K,V>public void replaceAll(BiFunction<? super K,? super V,? extends V> function)
replaceAll in interface Map<K,V>replaceAll in class LinkedHashMap<K,V>Copyright © 2019. All rights reserved.