Class ManagedConcurrentWeakHashMap<K,V> 
java.lang.Object
java.util.AbstractMap<K,V>
 
org.apache.tomcat.util.collections.ManagedConcurrentWeakHashMap<K,V> 
- Type Parameters:
- K- The type of keys used with the Map instance
- V- The type of values used with the Map instance
- All Implemented Interfaces:
- ConcurrentMap<K,,- V> - Map<K,- V> 
public class ManagedConcurrentWeakHashMap<K,V> 
extends AbstractMap<K,V>
implements ConcurrentMap<K,V>  
Concurrent hash map that holds its keys via weak references. Unlike
 
WeakHashMap this class does not handle dead keys during common
 access operations, but expects you to call its maintain() method
 periodically. Both keys and values are expected to be not-null.- 
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> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanisEmpty()voidmaintain()Method, that has to be invoked periodically to clean dead keys from the map.putIfAbsent(K key, V value) booleanbooleanintsize()values()Methods inherited from class java.util.AbstractMapclone, equals, hashCode, keySet, putAll, toStringMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.concurrent.ConcurrentMapcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
- 
Constructor Details- 
ManagedConcurrentWeakHashMappublic ManagedConcurrentWeakHashMap()
 
- 
- 
Method Details- 
maintainpublic void maintain()Method, that has to be invoked periodically to clean dead keys from the map.
- 
sizepublic int size()
- 
isEmptypublic boolean isEmpty()
- 
containsValue- Specified by:
- containsValuein interface- Map<K,- V> 
- Overrides:
- containsValuein class- AbstractMap<K,- V> 
 
- 
containsKey- Specified by:
- containsKeyin interface- Map<K,- V> 
- Overrides:
- containsKeyin class- AbstractMap<K,- V> 
 
- 
get
- 
put
- 
remove
- 
clearpublic void clear()
- 
putIfAbsent- Specified by:
- putIfAbsentin interface- ConcurrentMap<K,- V> 
- Specified by:
- putIfAbsentin interface- Map<K,- V> 
 
- 
remove
- 
replace
- 
replace
- 
values
- 
entrySet
 
-