Class ReferenceValueMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
org.eclipse.net4j.util.ref.ReferenceValueMap2<K,V>
org.eclipse.net4j.util.ref.ReferenceValueMap<K,V>
All Implemented Interfaces:
ConcurrentMap<K,V>, Map<K,V>
Direct Known Subclasses:
ReferenceValueMap.Soft, ReferenceValueMap.Strong, ReferenceValueMap.Weak

public abstract class ReferenceValueMap<K,V> extends ReferenceValueMap2<K,V> implements ConcurrentMap<K,V>
A ConcurrentMap implementation that uses KeyedReference instances (KeyedStrongReference, KeyedSoftReference, KeyedWeakReference or KeyedPhantomReference) as its values.

A ReferenceValueMap can be used to cache mappings until the value of the mapping is no longer reachable from outside of the map

Note: This map is not synchronized. If it is to be used by multiple threads concurrently the user is responsible for applying proper external synchronization!

Author:
Eike Stepper