K
- The key typeV
- The value typepublic final class WeakIdentityConcurrentMap<K,V>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
WeakIdentityConcurrentMap.CleanUpTask<T> |
private static class |
WeakIdentityConcurrentMap.IdentityWeakReference<T> |
Modifier and Type | Field and Description |
---|---|
private WeakIdentityConcurrentMap.CleanUpTask<V> |
cleanUpTask |
private java.util.concurrent.ConcurrentMap<java.lang.ref.WeakReference<K>,V> |
map |
private java.lang.ref.ReferenceQueue<K> |
queue |
Constructor and Description |
---|
WeakIdentityConcurrentMap()
Constructor
|
WeakIdentityConcurrentMap(WeakIdentityConcurrentMap.CleanUpTask<V> cleanUpTask)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
cleanUp() |
V |
get(K key) |
java.util.Set<K> |
keySet() |
V |
put(K key,
V value)
Puts into the underlying
|
V |
putIfAbsent(K key,
V value)
Puts into the underlying
|
V |
remove(K key)
Remove from the underlying
|
java.lang.String |
toString() |
private final java.lang.ref.ReferenceQueue<K> queue
private final WeakIdentityConcurrentMap.CleanUpTask<V> cleanUpTask
public WeakIdentityConcurrentMap()
public WeakIdentityConcurrentMap(WeakIdentityConcurrentMap.CleanUpTask<V> cleanUpTask)
cleanUpTask
-