org.jboss.cache.eviction
Class ElementSizeAlgorithm
java.lang.Object
org.jboss.cache.eviction.BaseEvictionAlgorithm
org.jboss.cache.eviction.BaseSortedEvictionAlgorithm
org.jboss.cache.eviction.ElementSizeAlgorithm
- All Implemented Interfaces:
- EvictionAlgorithm
public class ElementSizeAlgorithm
- extends BaseSortedEvictionAlgorithm
- Version:
- $Revision: 5475 $
- Author:
- Daniel Huang
Methods inherited from class org.jboss.cache.eviction.BaseEvictionAlgorithm |
emptyRecycleQueue, evict, evictCacheNode, getEvictionQueue, initialize, isNodeInUseAndNotTimedOut, isYoungerThanMinimumTimeToLive, processAddedElement, processAddedNodes, processAddedNodes, processMarkInUseNodes, processRemovedElement, processRemovedNodes, processUnmarkInUseNodes, processVisitedNodes, resetEvictionQueue, toString |
ElementSizeAlgorithm
public ElementSizeAlgorithm()
setupEvictionQueue
protected EvictionQueue setupEvictionQueue(Region region)
throws EvictionException
- Description copied from class:
BaseEvictionAlgorithm
- This method will create an EvictionQueue implementation and prepare it for use.
- Specified by:
setupEvictionQueue
in class BaseEvictionAlgorithm
- Parameters:
region
- MarshRegion to setup an eviction queue for.
- Returns:
- The created EvictionQueue to be used as the eviction queue for this algorithm.
- Throws:
EvictionException
- See Also:
EvictionQueue
shouldEvictNode
protected boolean shouldEvictNode(NodeEntry ne)
- Description copied from class:
BaseEvictionAlgorithm
- This method will check whether the given node should be evicted or not.
- Specified by:
shouldEvictNode
in class BaseEvictionAlgorithm
- Parameters:
ne
- NodeEntry to test eviction for.
- Returns:
- True if the given node should be evicted. False if the given node should not be evicted.
prune
protected void prune()
throws EvictionException
- Overrides:
prune
in class BaseEvictionAlgorithm
- Throws:
EvictionException
Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.