public final class LruMemoryStore.SpoolingLinkedHashMap extends LinkedHashMap
removeEldestEntry(java.util.Map.Entry)
to persist cache entries to the auxiliary cache before they are removed.
This implementation also provides LRU by access order.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
SpoolingLinkedHashMap()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
put(Object key,
Object value) |
protected boolean |
removeEldestEntry(Map.Entry eldest)
Returns true if this map should remove its eldest entry.
|
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, size
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, remove, replace, replace, size
public SpoolingLinkedHashMap()
protected final boolean removeEldestEntry(Map.Entry eldest)
removeEldestEntry
in class LinkedHashMap
eldest
- The least recently inserted entry in the map, or if
this is an access-ordered map, the least recently accessed
entry. This is the entry that will be removed it this
method returns true. If the map was empty prior
to the put or putAll invocation resulting
in this invocation, this will be the entry that was just
inserted; in other words, if the map contains a single
entry, the eldest entry is also the newest.Copyright © 2003–2016 Terracotta, Inc.. All rights reserved.