com.j_spaces.map.eviction
Class LRUEvictionStrategy

java.lang.Object
  extended by com.j_spaces.map.eviction.AbstractEvictionStrategy
      extended by com.j_spaces.map.eviction.FIFOEvictionStrategy
          extended by com.j_spaces.map.eviction.LRUEvictionStrategy
All Implemented Interfaces:
EvictionStrategy

public class LRUEvictionStrategy
extends FIFOEvictionStrategy

The LRU policies keep recently referenced objects. i.e., it replaces the object that has not been accessed for the longest time.

Since:
5.0

Constructor Summary
LRUEvictionStrategy()
           
 
Method Summary
 void touchEntry(CacheEntry entry)
          Informs the eviction strategy on a CacheEntry use.
 
Methods inherited from class com.j_spaces.map.eviction.FIFOEvictionStrategy
clear, createEntry, discardEntry, evict
 
Methods inherited from class com.j_spaces.map.eviction.AbstractEvictionStrategy
setBatchSize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LRUEvictionStrategy

public LRUEvictionStrategy()
Method Detail

touchEntry

public void touchEntry(CacheEntry entry)
Informs the eviction strategy on a CacheEntry use.

Specified by:
touchEntry in interface EvictionStrategy
Overrides:
touchEntry in class FIFOEvictionStrategy
Parameters:
entry - the touched entry