Package org.apache.cayenne.util
Class SoftValueMap<K,V> 
java.lang.Object
java.util.AbstractMap<K,V>
 
org.apache.cayenne.util.SoftValueMap<K,V> 
- All Implemented Interfaces:
- Serializable,- Map<K,- V> 
Map that stores values wrapped into 
SoftReference- Since:
- 4.1
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> 
- 
Field SummaryFieldsModifier and TypeFieldDescriptionThis is a lazily created set of entries that is essentially a view to actual dataprotected HashMap<K,SoftReference<V>> This is a main data storage used for most operationsprotected ReferenceQueue<V>
- 
Constructor SummaryConstructorsConstructorDescriptionSoftValueMap(int initialCapacity) SoftValueMap(Map<? extends K, ? extends V> m) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidCleanup all references collected by GC so farvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanisEmpty()keySet()voidintsize()values()Methods inherited from class java.util.AbstractMapclone, equals, hashCode, toStringMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Field Details- 
mapThis is a main data storage used for most operations
- 
referenceQueue
- 
entrySetThis is a lazily created set of entries that is essentially a view to actual data
 
- 
- 
Constructor Details- 
SoftValueMappublic SoftValueMap()
- 
SoftValueMappublic SoftValueMap(int initialCapacity) 
- 
SoftValueMap
 
- 
- 
Method Details- 
sizepublic int size()- Specified by:
- sizein interface- Map<K,- V> 
- Overrides:
- sizein class- AbstractMap<K,- V> 
 
- 
isEmptypublic boolean isEmpty()- Specified by:
- isEmptyin interface- Map<K,- V> 
- Overrides:
- isEmptyin class- AbstractMap<K,- V> 
 
- 
containsKey- Specified by:
- containsKeyin interface- Map<K,- V> 
- Overrides:
- containsKeyin class- AbstractMap<K,- V> 
 
- 
containsValue- Specified by:
- containsValuein interface- Map<K,- V> 
- Overrides:
- containsValuein class- AbstractMap<K,- V> 
 
- 
get- Specified by:
- getin interface- Map<K,- V> 
- Overrides:
- getin class- AbstractMap<K,- V> 
 
- 
put- Specified by:
- putin interface- Map<K,- V> 
- Overrides:
- putin class- AbstractMap<K,- V> 
 
- 
remove- Specified by:
- removein interface- Map<K,- V> 
- Overrides:
- removein class- AbstractMap<K,- V> 
 
- 
putAll- Specified by:
- putAllin interface- Map<K,- V> 
- Overrides:
- putAllin class- AbstractMap<K,- V> 
 
- 
clearpublic void clear()- Specified by:
- clearin interface- Map<K,- V> 
- Overrides:
- clearin class- AbstractMap<K,- V> 
 
- 
keySet- Specified by:
- keySetin interface- Map<K,- V> 
- Overrides:
- keySetin class- AbstractMap<K,- V> 
 
- 
values- Specified by:
- valuesin interface- Map<K,- V> 
- Overrides:
- valuesin class- AbstractMap<K,- V> 
 
- 
entrySet- Specified by:
- entrySetin interface- Map<K,- V> 
- Specified by:
- entrySetin class- AbstractMap<K,- V> 
 
- 
checkReferenceQueueprotected void checkReferenceQueue()Cleanup all references collected by GC so far
 
-