net.sf.ehcache.store
Class MemoryStore.SpoolingLRUMap

java.lang.Object
  extended byorg.apache.commons.collections.SequencedHashMap
      extended byorg.apache.commons.collections.LRUMap
          extended bynet.sf.ehcache.store.MemoryStore.SpoolingLRUMap
All Implemented Interfaces:
java.lang.Cloneable, java.io.Externalizable, java.util.Map, java.io.Serializable
Enclosing class:
MemoryStore

public class MemoryStore.SpoolingLRUMap
extends org.apache.commons.collections.LRUMap

An LRU Map implementation based on Apache Commons LRUMap. This is used if LinkedHashMap is not found in the classpath. LinkedHashMap is part of JDK

See Also:
Serialized Form

Constructor Summary
MemoryStore.SpoolingLRUMap()
          Constructor.
 
Method Summary
protected  void processRemovedLRU(java.lang.Object key, java.lang.Object value)
          Called after the element has been removed.
 
Methods inherited from class org.apache.commons.collections.LRUMap
get, getMaximumSize, put, readExternal, removeLRU, setMaximumSize, writeExternal
 
Methods inherited from class org.apache.commons.collections.SequencedHashMap
clear, clone, containsKey, containsValue, entrySet, equals, get, getFirst, getFirstKey, getFirstValue, getLast, getLastKey, getLastValue, getValue, hashCode, indexOf, isEmpty, iterator, keySet, lastIndexOf, putAll, remove, remove, sequence, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MemoryStore.SpoolingLRUMap

public MemoryStore.SpoolingLRUMap()
Constructor. The maximum size is set to Cache.getMaxElementsInMemory(). If the LRUMap gets bigger than this, processRemovedLRU(java.lang.Object, java.lang.Object) is called.

Method Detail

processRemovedLRU

protected void processRemovedLRU(java.lang.Object key,
                                 java.lang.Object value)
Called after the element has been removed. Our choices are to do nothing or spool the element to disk.

Parameters:
key -
value -