org.jboss.cache.eviction
Class AopLRUAlgorithm

java.lang.Object
  extended by org.jboss.cache.eviction.BaseEvictionAlgorithm
      extended by org.jboss.cache.eviction.LRUAlgorithm
          extended by org.jboss.cache.eviction.AopLRUAlgorithm
All Implemented Interfaces:
EvictionAlgorithm

public class AopLRUAlgorithm
extends LRUAlgorithm

LRUAlgorithm specific to TreeCacheAop. Overriding couple of hooks to customize the algorithm such that it works correctly when using TreeCacheAop. The basic strategy for the AOP-specific case are:

Author:
Ben Wang, Feb 17, 2004

Field Summary
 
Fields inherited from class org.jboss.cache.eviction.BaseEvictionAlgorithm
evictionQueue, recycleQueue, region
 
Constructor Summary
AopLRUAlgorithm()
           
 
Method Summary
protected  java.util.Set getAssociatedEvictNode(Fqn fqn)
          Hook for evict.
protected  boolean preAddedNodes(Fqn fqn)
          Hook for processAddedNodes.
protected  boolean preVisitedNodes(Fqn fqn, long stamp)
          Hook for processVisitedNodes
 
Methods inherited from class org.jboss.cache.eviction.LRUAlgorithm
prune, setupEvictionQueue, shouldEvictNode
 
Methods inherited from class org.jboss.cache.eviction.BaseEvictionAlgorithm
emptyRecycleQueue, evict, evictCacheNode, getEvictionQueue, initialize, process, processAddedNodes, processQueues, processRemovedNodes, processVisitedNodes, resetEvictionQueue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.cache.eviction.EvictionAlgorithm
getEvictionQueue, process, resetEvictionQueue
 

Constructor Detail

AopLRUAlgorithm

public AopLRUAlgorithm()
Method Detail

getAssociatedEvictNode

protected java.util.Set getAssociatedEvictNode(Fqn fqn)
Hook for evict.

Parameters:
fqn -
Returns:
Set of associated node to evict as well in string

preAddedNodes

protected boolean preAddedNodes(Fqn fqn)
Hook for processAddedNodes.


preVisitedNodes

protected boolean preVisitedNodes(Fqn fqn,
                                  long stamp)
Hook for processVisitedNodes

Parameters:
fqn -
Returns:
true if it is successful


Copyright © 1998-2005 JBoss Inc . All Rights Reserved.