K
- The type of keys used with the Map instanceV
- The type of values used with the Map instancejava.util.concurrent.ConcurrentMap<K,V>
, java.util.Map<K,V>
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 | Description |
---|---|
ManagedConcurrentWeakHashMap() |
Modifier and Type | Method | 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.