Package org.apfloat.internal
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 java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
entrySet()
putIfAbsent
(K key, V value) boolean
boolean
int
size()
private V
unwrap
(SoftReference<V> value) private SoftReference
<V> Methods inherited from class java.util.AbstractMap
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
Methods inherited from interface java.util.Map
containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, values
-
Field Details
-
map
-
-
Constructor Details
-
ConcurrentSoftHashMap
public ConcurrentSoftHashMap()
-
-
Method Details
-
clear
public void clear() -
entrySet
-
get
-
put
-
putIfAbsent
- Specified by:
putIfAbsent
in interfaceConcurrentMap<K,
V> - Specified by:
putIfAbsent
in interfaceMap<K,
V>
-
remove
-
remove
-
replace
-
replace
-
size
public int size() -
wrap
-
unwrap
-