Class ReferenceValueMap2<K,V>

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

public abstract class ReferenceValueMap2<K,V> extends AbstractMap<K,V>
A Map 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!

Since:
3.3
Author:
Eike Stepper