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-safeMap
whose values are kept alive by soft/weakReference
s.
-
-
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) void
compact()
Compacts the map by removing cleared values.V
putIfAbsent(K key, V value)
boolean
remove(java.lang.Object key, java.lang.Object value)
V
replace(K key, V value)
boolean
replace(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:MildValues
Compacts the map by removing cleared values.- Overrides:
compact
in classMildValues<K,V>
-
-