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:
java.util.concurrent.ConcurrentMap<K,V>
,java.util.Map<K,V>
class ConcurrentSoftHashMap<K,V> extends java.util.AbstractMap<K,V> implements java.util.concurrent.ConcurrentMap<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
-
-
Constructor Summary
Constructors Constructor Description ConcurrentSoftHashMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
V
get(java.lang.Object key)
V
put(K key, V value)
V
putIfAbsent(K key, V value)
V
remove(java.lang.Object key)
boolean
remove(java.lang.Object key, java.lang.Object value)
V
replace(K key, V value)
boolean
replace(K key, V oldValue, V newValue)
int
size()
private V
unwrap(java.lang.ref.SoftReference<V> value)
private java.lang.ref.SoftReference<V>
wrap(V value)
-
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
-
-
-
-
Method Detail
-
clear
public void clear()
-
get
public V get(java.lang.Object key)
-
remove
public V remove(java.lang.Object key)
-
remove
public boolean remove(java.lang.Object key, java.lang.Object value)
-
size
public int size()
-
-