- All Implemented Interfaces:
- Direct Known Subclasses:
- ElementSizeAlgorithm, LFUAlgorithm
public abstract class BaseSortedEvictionAlgorithm
- extends BaseEvictionAlgorithm
An abstract SortedEvictionAlgorithm.
This class supports early termination of the eviction queue processing. Because the eviction
queue is sorted by first to evict to last to evict, when iterating the eviction queue, the first time
a node is encountered that does not require eviction will terminate the loop early. This way we don't incur
the full breadth of the O(n) = n operation everytime we need to check for eviction (defined by eviction poll time
- Daniel Huang - email@example.com - 10/2005
Event processing for Evict/Add/Visiting of nodes.
This method is called to resort the queue after add or visit events have occurred.
|Methods inherited from class org.jboss.cache.eviction.BaseEvictionAlgorithm
emptyRecycleQueue, evict, evictCacheNode, getEvictionQueue, initialize, isNodeInUseAndNotTimedOut, isYoungerThanMinimumTimeToLive, process, processAddedElement, processAddedNodes, processAddedNodes, processMarkInUseNodes, processRemovedElement, processRemovedNodes, processUnmarkInUseNodes, processVisitedNodes, prune, resetEvictionQueue, setupEvictionQueue, shouldEvictNode, toString
protected void processQueues(Region region)
- Description copied from class:
- Event processing for Evict/Add/Visiting of nodes.
- On AddEvents a new element is added into the eviction queue
- On RemoveEvents, the removed element is removed from the eviction queue.
- On VisitEvents, the visited node has its eviction statistics updated (idleTime, numberOfNodeVisists, etc..)
processQueues in class
region - Cache region to process for eviction.
protected void resortEvictionQueue(boolean evictionQueueModified)
- This method is called to resort the queue after add or visit events have occurred.
If the parameter is true, the queue needs to be resorted. If it is false, the queue does not
evictionQueueModified - True if the queue was added to or visisted during event processing.
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.