Class ConcurrentSoftHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.apfloat.internal.ConcurrentSoftHashMap<K,V>
- All Implemented Interfaces:
ConcurrentMap<K,V>, Map<K, V>
ConcurrentHashMap with softly referenced values.
The maximum map size is assumed to be limited so no
effort is made to expunge entries for stale values.
Values are not properly compared for equality so
the only actual concurrent method implemented is
putIfAbsent().
- Since:
- 1.7.0
- Version:
- 1.9.0
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()entrySet()putIfAbsent(K key, V value) booleanbooleanintsize()private Vunwrap(SoftReference<V> value) private SoftReference<V> Methods inherited from class AbstractMap
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, valuesMethods inherited from interface ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAllMethods inherited from interface Map
containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, values
-
Field Details
-
map
-
-
Constructor Details
-
ConcurrentSoftHashMap
public ConcurrentSoftHashMap()
-
-
Method Details
-
clear
-
entrySet
-
get
-
put
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceConcurrentMap<K,V> - Specified by:
putIfAbsentin interfaceMap<K,V>
-
remove
-
remove
-
replace
-
replace
-
size
-
wrap
-
unwrap
-