K - Key object of type K.V - Value object of type V.public final class SoftHashMap<K,V> extends AbstractMap<K,V>
Based on the SoftHashMap implemented by Dr. Heinz Kabutz.
Hash map based on soft references. The hash map always makes sure a limited amount of strong references it maintained in FIFO order to _simulate_ LRU.
Note that the put and remove methods always return null.
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
SoftHashMap()
Default constructor internally using 32 strong references.
|
SoftHashMap(int initStrongReferenceCount)
Constructor that allows to specify how many strong references should be
used internally.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
V |
put(K key,
V value) |
V |
remove(Object key) |
int |
size() |
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, valuespublic SoftHashMap()
public SoftHashMap(int initStrongReferenceCount)
initStrongReferenceCount - Number of internal strong references.Copyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.