当前页面:
在线文档首页 >
JBoss 3.2.7 Cache API Documentation 英文版文档
LRUAlgorithm (JBoss Cache API) - JBoss 3.2.7 Cache API Documentation 英文版文档
org.jboss.cache.eviction
Class LRUAlgorithm
java.lang.Object
org.jboss.cache.eviction.LRUAlgorithm
- All Implemented Interfaces:
- EvictionAlgorithm
- Direct Known Subclasses:
- FIFOAlgorithm
- public class LRUAlgorithm
- extends Object
- implements EvictionAlgorithm
Least recently Used algorithm to purge old data.
Note that this algorithm is not thread-safe.
- Author:
- Ben Wang 02-2004
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log_
protected org.jboss.logging.Logger log_
nodeMap_
protected Map nodeMap_
head_
protected NodeEntry head_
tail_
protected NodeEntry tail_
region_
protected Region region_
LRUAlgorithm
public LRUAlgorithm()
process
public void process(Region region)
throws EvictionException
- No lock is used here since we assume it is single-threaded access by the timer only.
- Specified by:
process
in interface EvictionAlgorithm
- Parameters:
region
-
- Throws:
EvictionException
resetEvictionQueue
public void resetEvictionQueue(Region region)
- Description copied from interface:
EvictionAlgorithm
- Reset the whole eviction queue. Queue may needs to be reset due to corrupted state, for example.
- Specified by:
resetEvictionQueue
in interface EvictionAlgorithm
- Parameters:
region
- Region that this algorithm will operate on.
demote
protected void demote(Fqn fqn)
throws EvictionException
- Throws:
EvictionException
evict
protected void evict(Fqn fqn)
throws EvictionException
- Throws:
EvictionException
evictionQueueSize
public int evictionQueueSize()
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.