public class ManagedConcurrentValueMap<K, V> extends Object
This is a basic implementation of a map able to forget its values. This map uses internally a ConcurrentHashMap, thus should be safe for concurrency. hashcode and equals are used to find the entries and should thus be implemented properly for the keys. This map does not support null keys.
K
- the key typeV
- the value typeConstructor and description |
---|
ManagedConcurrentValueMap(ReferenceBundle bundle) |
Type Params | Return Type | Name and description |
---|---|---|
|
public void |
finalizeReference() |
|
public V |
get(K key) Returns the value stored for the given key at the point of call. |
|
public void |
put(K key, V value) Sets a new value for a given key. an older value is overwritten. |
|
public void |
setBundle(ReferenceBundle bundle) Sets a new bundle used for reference creation. |
Returns the value stored for the given key at the point of call.
key
- a non null keySets a new value for a given key. an older value is overwritten.
key
- a non null keyvalue
- the new valueSets a new bundle used for reference creation. Be warned that older entries will not be changed by this
bundle
- - the ReferenceBundleCopyright © 2003-2024 The Apache Software Foundation. All rights reserved.