K - The key typeV - The value typepublic final class WeakIdentityConcurrentMap<K,V> extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
WeakIdentityConcurrentMap.CleanUpTask<T> |
| Constructor and Description |
|---|
WeakIdentityConcurrentMap()
Constructor
|
WeakIdentityConcurrentMap(WeakIdentityConcurrentMap.CleanUpTask<V> cleanUpTask)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp() |
boolean |
containsKey(K key) |
V |
get(K key) |
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
|
String |
toString() |
public WeakIdentityConcurrentMap()
public WeakIdentityConcurrentMap(WeakIdentityConcurrentMap.CleanUpTask<V> cleanUpTask)
cleanUpTask - task cleaning up referencespublic V put(K key, V value)
key - key with which the specified value is to be associatedvalue - value to be associated with the specified keypublic V remove(K key)
key - key whose mapping is to be removed from the mappublic V putIfAbsent(K key, V value)
key - key with which the specified value is to be associatedvalue - value to be associated with the specified keynull if there was no mapping for the key.
(A null return can also indicate that the map
previously associated null with the key,
if the implementation supports null values.)public V get(K key)
key - the key whose associated value is to be returnednull if this map contains no mapping for the keypublic void cleanUp()
public boolean containsKey(K key)
Copyright © 2024 Terracotta. All rights reserved.