|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.cache.eviction.BaseEvictionAlgorithm org.jboss.cache.eviction.MRUAlgorithm
public class MRUAlgorithm
Most Recently Used Algorithm.
This algorithm will evict the most recently used cache entries from cache. Note: None of the Eviction classes are thread safe. It is assumed that an individual instance of an EvictionPolicy/ EvictionAlgorithm/EvictionQueue/EvictionConfiguration are only operated on by one thread at any given time.
Field Summary |
---|
Fields inherited from class org.jboss.cache.eviction.BaseEvictionAlgorithm |
---|
evictionQueue, recycleQueue, region |
Constructor Summary | |
---|---|
MRUAlgorithm()
|
Method Summary | |
---|---|
protected void |
processVisitedNodes(Fqn fqn)
Visit a node in cache. |
protected EvictionQueue |
setupEvictionQueue(Region region)
This method will create an EvictionQueue implementation and prepare it for use. |
protected boolean |
shouldEvictNode(NodeEntry ne)
This method will check whether the given node should be evicted or not. |
Methods inherited from class org.jboss.cache.eviction.BaseEvictionAlgorithm |
---|
emptyRecycleQueue, evict, evictCacheNode, getEvictionQueue, initialize, isNodeInUseAndNotTimedOut, process, processAddedElement, processAddedNodes, processMarkInUseNodes, processQueues, processRemovedElement, processRemovedNodes, processUnmarkInUseNodes, prune, resetEvictionQueue, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MRUAlgorithm()
Method Detail |
---|
protected EvictionQueue setupEvictionQueue(Region region) throws EvictionException
BaseEvictionAlgorithm
setupEvictionQueue
in class BaseEvictionAlgorithm
region
- MarshRegion to setup an eviction queue for.
EvictionException
EvictionQueue
protected boolean shouldEvictNode(NodeEntry ne)
BaseEvictionAlgorithm
shouldEvictNode
in class BaseEvictionAlgorithm
ne
- NodeEntry to test eviction for.
protected void processVisitedNodes(Fqn fqn) throws EvictionException
BaseEvictionAlgorithm
processVisitedNodes
in class BaseEvictionAlgorithm
fqn
- FQN of the visited node.
EvictionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |