Class WeakValueMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
org.apache.cayenne.util.WeakValueMap<K,V>
All Implemented Interfaces:
Serializable, Map<K,V>

public class WeakValueMap<K,V> extends AbstractMap<K,V> implements Serializable
Map that stores values wrapped into WeakReference
Since:
4.1
See Also:
  • Field Details

    • map

      protected transient HashMap<K,WeakReference<V>> map
      This is a main data storage used for most operations
    • referenceQueue

      protected transient ReferenceQueue<V> referenceQueue
    • entrySet

      protected transient Set<Map.Entry<K,V>> entrySet
      This is a lazily created set of entries that is essentially a view to actual data
  • Constructor Details

    • WeakValueMap

      public WeakValueMap()
    • WeakValueMap

      public WeakValueMap(int initialCapacity)
    • WeakValueMap

      public WeakValueMap(Map<? extends K,? extends V> m)
  • Method Details