public static class WeakConcurrentMap.WithInlinedExpunction<K,V> extends WeakConcurrentMap<K,V>
WeakConcurrentMap
where stale entries are removed as a side effect of interacting with this map.WeakConcurrentMap.WithInlinedExpunction<K,V>
target
Constructor and Description |
---|
WithInlinedExpunction() |
Modifier and Type | Method and Description |
---|---|
int |
approximateSize()
Returns the approximate size of this map where the returned number is at least as big as the actual number of entries.
|
boolean |
containsKey(K key) |
V |
get(K key) |
java.util.Iterator<java.util.Map.Entry<K,V>> |
iterator() |
V |
put(K key,
V value) |
V |
remove(K key) |
clear, defaultValue, expungeStaleEntries, getCleanerThread, run
public V get(K key)
get
in class WeakConcurrentMap<K,V>
key
- The key of the entry.public boolean containsKey(K key)
containsKey
in class WeakConcurrentMap<K,V>
key
- The key of the entry.true
if the key already defines a value.public V put(K key, V value)
put
in class WeakConcurrentMap<K,V>
key
- The key of the entry.value
- The value of the entry.null
if it does not exist.public V remove(K key)
remove
in class WeakConcurrentMap<K,V>
key
- The key of the entry.null
if it does not exist.public int approximateSize()
WeakConcurrentMap
approximateSize
in class WeakConcurrentMap<K,V>