Class SoftRefMap<K,V> 
java.lang.Object
com.inductiveautomation.ignition.common.util.SoftRefMap<K,V> 
- All Implemented Interfaces:
- Map<K,- V> 
A very simple cache map implementation using soft references around the keys. This class is very much NOT
 thread-safe, so if there is any multi- threaded use, you must wrap in Collections.synchronizedMap(). Also,
 containsValue(), entrySet(), and values() are not supported. This class also doesn't prune the keys for cleared
 references aggressivly - you can prune them yourself by calling pruneClearedReferences()
XXX Colby says: just happened upon this... might be worth looking into replacing this class with the Google Collections MapMaker, which supports soft keys, concurrency, auto pruning, and a value generation function.
XXX Colby says: just happened upon this... might be worth looking into replacing this class with the Google Collections MapMaker, which supports soft keys, concurrency, auto pruning, and a value generation function.
- 
Nested Class Summary
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanisEmpty()keySet()voidvoidintsize()values()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Field Details- 
map
 
- 
- 
Constructor Details- 
SoftRefMappublic SoftRefMap()
 
- 
- 
Method Details- 
clearpublic void clear()
- 
containsKey- Specified by:
- containsKeyin interface- Map<K,- V> 
 
- 
containsValue- Specified by:
- containsValuein interface- Map<K,- V> 
 
- 
entrySet
- 
values
- 
pruneClearedReferencespublic void pruneClearedReferences()
- 
get
- 
isEmptypublic boolean isEmpty()
- 
keySet
- 
put
- 
putAll
- 
remove
- 
sizepublic int size()
 
-