Package com.j_spaces.map.eviction
Class LRUEvictionStrategy
java.lang.Object
com.j_spaces.map.eviction.AbstractEvictionStrategy
com.j_spaces.map.eviction.FIFOEvictionStrategy
com.j_spaces.map.eviction.LRUEvictionStrategy
- All Implemented Interfaces:
EvictionStrategy
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
- Version:
- 1.0
- Author:
- Guy Korland
-
Field Summary
Fields inherited from class com.j_spaces.map.eviction.FIFOEvictionStrategy
_chainFields inherited from class com.j_spaces.map.eviction.AbstractEvictionStrategy
_batchSize -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidtouchEntry(CacheEntry entry) Informs the eviction strategy on a CacheEntry use.Methods inherited from class com.j_spaces.map.eviction.FIFOEvictionStrategy
clear, createEntry, discardEntry, evictMethods inherited from class com.j_spaces.map.eviction.AbstractEvictionStrategy
setBatchSize
-
Constructor Details
-
LRUEvictionStrategy
public LRUEvictionStrategy()
-
-
Method Details
-
touchEntry
Informs the eviction strategy on a CacheEntry use.- Specified by:
touchEntryin interfaceEvictionStrategy- Overrides:
touchEntryin classFIFOEvictionStrategy- Parameters:
entry- the touched entry
-