Package org.eclipse.sisu.inject
Class MildConcurrentValues<K,V>
- java.lang.Object
-
- org.eclipse.sisu.inject.MildValues<K,V>
-
- org.eclipse.sisu.inject.MildConcurrentValues<K,V>
-
- All Implemented Interfaces:
java.util.concurrent.ConcurrentMap<K,V>,java.util.Map<K,V>
final class MildConcurrentValues<K,V> extends MildValues<K,V> implements java.util.concurrent.ConcurrentMap<K,V>
Thread-safeMapwhose values are kept alive by soft/weakReferences.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.sisu.inject.MildValues
MildValues.EntryItr, MildValues.InverseMapping, MildValues.StrongEntry, MildValues.ValueItr
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.ConcurrentMap<K,java.lang.ref.Reference<V>>concurrentMap-
Fields inherited from class org.eclipse.sisu.inject.MildValues
map, queue
-
-
Constructor Summary
Constructors Constructor Description MildConcurrentValues(java.util.concurrent.ConcurrentMap<K,java.lang.ref.Reference<V>> map, boolean soft)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidcompact()Compacts the map by removing cleared values.VputIfAbsent(K key, V value)booleanremove(java.lang.Object key, java.lang.Object value)Vreplace(K key, V value)booleanreplace(K key, V oldValue, V newValue)-
Methods inherited from class org.eclipse.sisu.inject.MildValues
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, mildValue, put, putAll, remove, size, tempValue, values
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
remove
public boolean remove(java.lang.Object key, java.lang.Object value)
-
compact
void compact()
Description copied from class:MildValuesCompacts the map by removing cleared values.- Overrides:
compactin classMildValues<K,V>
-
-