|
||||||||||
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.LRUAlgorithm
public class LRUAlgorithm
Least recently Used algorithm to purge old data. Note that this algorithm is not thread-safe.
Field Summary |
---|
Fields inherited from class org.jboss.cache.eviction.BaseEvictionAlgorithm |
---|
evictionQueue, recycleQueue, region |
Constructor Summary | |
---|---|
LRUAlgorithm()
|
Method Summary | |
---|---|
protected void |
evict(NodeEntry ne)
|
protected LRUConfiguration |
getConfiguration()
|
protected void |
prune()
|
protected EvictionQueue |
setupEvictionQueue(Region region)
This method will create an EvictionQueue implementation and prepare it for use. |
protected boolean |
shouldEvictNode(NodeEntry entry)
This method will check whether the given node should be evicted or not. |
Methods inherited from class org.jboss.cache.eviction.BaseEvictionAlgorithm |
---|
emptyRecycleQueue, evictCacheNode, getEvictionQueue, initialize, isNodeInUseAndNotTimedOut, process, processAddedElement, processAddedNodes, processMarkInUseNodes, processQueues, processRemovedElement, processRemovedNodes, processUnmarkInUseNodes, processVisitedNodes, resetEvictionQueue, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.cache.eviction.EvictionAlgorithm |
---|
getEvictionQueue, process, resetEvictionQueue |
Constructor Detail |
---|
public LRUAlgorithm()
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 entry)
BaseEvictionAlgorithm
shouldEvictNode
in class BaseEvictionAlgorithm
entry
- NodeEntry to test eviction for.
protected void evict(NodeEntry ne)
evict
in class BaseEvictionAlgorithm
protected void prune() throws EvictionException
prune
in class BaseEvictionAlgorithm
EvictionException
protected LRUConfiguration getConfiguration()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |