net.sf.ehcache.store

Class LruMemoryStore.SpoolingLRUMap

public final class LruMemoryStore.SpoolingLRUMap extends LRUMap

An LRU Map implementation based on Apache Commons LRUMap.

This is used if java.util.LinkedHashMap is not found in the classpath. LinkedHashMap is part of JDK

Constructor Summary
SpoolingLRUMap()
Constructor.
Method Summary
protected voidprocessRemovedLRU(Object key, Object value)
Called after the element has been removed.

Constructor Detail

SpoolingLRUMap

public SpoolingLRUMap()
Constructor. The maximum size is set to Cache. If the LRUMap gets bigger than this, SpoolingLRUMap is called.

Method Detail

processRemovedLRU

protected final void processRemovedLRU(Object key, Object value)
Called after the element has been removed.

Our choices are to do nothing or spool the element to disk.

Note that value will be null when the memory size is set to 0. Thus a null guard is used.

Parameters: key value