public class ManagedConcurrentWeakHashMap<K,V>
extends java.util.AbstractMap<K,V>
implements java.util.concurrent.ConcurrentMap<K,V>
WeakHashMap
this class does not handle dead keys during common
access operations, but expects you to call its maintain()
method
periodically. Both keys and values are expected to be not-null
.Constructor and Description |
---|
ManagedConcurrentWeakHashMap() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
V |
get(java.lang.Object key) |
boolean |
isEmpty() |
void |
maintain()
Method, that has to be invoked periodically to clean dead keys from the
map.
|
V |
put(K key,
V value) |
V |
putIfAbsent(K key,
V value) |
V |
remove(java.lang.Object key) |
boolean |
remove(java.lang.Object key,
java.lang.Object value) |
V |
replace(K key,
V value) |
boolean |
replace(K key,
V oldValue,
V newValue) |
int |
size() |
java.util.Collection<V> |
values() |
clone, equals, hashCode, keySet, putAll, toString
public void maintain()
public int size()
public boolean isEmpty()
public boolean containsValue(java.lang.Object value)
public boolean containsKey(java.lang.Object key)
public V get(java.lang.Object key)
public V remove(java.lang.Object key)
public void clear()
public boolean remove(java.lang.Object key, java.lang.Object value)
public java.util.Collection<V> values()
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.