public class SoftRefCache extends Object implements Level1Cache
If map entry value object is not actively being used, i.e. no other object has a strong reference to it,
it may become garbage collected at the discretion of the garbage collector (typically if the VM is low on
memory). If this happens, the entry in the SoftValueMap corresponding to the value object will
also be removed.
SoftReference| Constructor and Description |
|---|
SoftRefCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set |
entrySet() |
ObjectProvider |
get(Object key) |
boolean |
isEmpty() |
Set |
keySet() |
ObjectProvider |
put(Object key,
ObjectProvider value) |
void |
putAll(Map t) |
ObjectProvider |
remove(Object key) |
int |
size() |
Collection |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic ObjectProvider put(Object key, ObjectProvider value)
put in interface Map<Object,ObjectProvider>public ObjectProvider get(Object key)
get in interface Map<Object,ObjectProvider>public boolean containsKey(Object key)
containsKey in interface Map<Object,ObjectProvider>public ObjectProvider remove(Object key)
remove in interface Map<Object,ObjectProvider>public void clear()
clear in interface Map<Object,ObjectProvider>public boolean containsValue(Object value)
containsValue in interface Map<Object,ObjectProvider>public Set entrySet()
entrySet in interface Map<Object,ObjectProvider>public boolean isEmpty()
isEmpty in interface Map<Object,ObjectProvider>public Set keySet()
keySet in interface Map<Object,ObjectProvider>public void putAll(Map t)
putAll in interface Map<Object,ObjectProvider>public int size()
size in interface Map<Object,ObjectProvider>public Collection values()
values in interface Map<Object,ObjectProvider>Copyright © 2017. All rights reserved.