com.easyjf.cache.store
Class LruMemoryStore.SpoolingLinkedHashMap

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byjava.util.LinkedHashMap
              extended bycom.easyjf.cache.store.LruMemoryStore.SpoolingLinkedHashMap
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable
Enclosing class:
LruMemoryStore

public class LruMemoryStore.SpoolingLinkedHashMap
extends java.util.LinkedHashMap

An extension of LinkedHashMap which overrides #removeEldestEntry to persist cache entries to the auxiliary cache before they are removed.

This implementation also provides LRU by access order.

See Also:
Serialized Form

Constructor Summary
LruMemoryStore.SpoolingLinkedHashMap()
          Default constructor.
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

LruMemoryStore.SpoolingLinkedHashMap

public LruMemoryStore.SpoolingLinkedHashMap()
Default constructor. Will create an initial capacity of 100, a loading of .75 and LRU by access order.