Package io.roastedroot.zerofs
Class WeakValueConcurrentMap<K,V>
- java.lang.Object
-
- io.roastedroot.zerofs.WeakValueConcurrentMap<K,V>
-
- All Implemented Interfaces:
java.util.concurrent.ConcurrentMap<K,V>,java.util.Map<K,V>
public class WeakValueConcurrentMap<K,V> extends java.lang.Object implements java.util.concurrent.ConcurrentMap<K,V>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classWeakValueConcurrentMap.WeakValue<K,V>
-
Constructor Summary
Constructors Constructor Description WeakValueConcurrentMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.Set<java.util.Map.Entry<K,V>>entrySet()Vget(java.lang.Object key)booleanisEmpty()java.util.Set<K>keySet()private voidprocessQueue()Vput(K key, V value)voidputAll(java.util.Map<? extends K,? extends V> m)VputIfAbsent(K key, V value)Vremove(java.lang.Object key)booleanremove(java.lang.Object key, java.lang.Object value)Vreplace(K key, V value)booleanreplace(K key, V oldValue, V newValue)intsize()java.util.Collection<V>values()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
map
private final java.util.concurrent.ConcurrentMap<K,WeakValueConcurrentMap.WeakValue<K,V>> map
-
queue
private final java.lang.ref.ReferenceQueue<V> queue
-
-
Method Detail
-
processQueue
private void processQueue()
-
remove
public boolean remove(java.lang.Object key, java.lang.Object value)
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
-