org.jboss.cache.eviction
Class AopLRUPolicy

java.lang.Object
  extended byorg.jboss.cache.eviction.BaseEvictionPolicy (src) 
      extended byorg.jboss.cache.eviction.LRUPolicy (src) 
          extended byorg.jboss.cache.eviction.AopLRUPolicy
All Implemented Interfaces:
AopEvictionPolicy (src) , EvictionPolicy (src) , TreeCacheListener (src)

public class AopLRUPolicy
extends LRUPolicy (src)
implements AopEvictionPolicy (src)

Provider to provide eviction policy. This one is based on LRU algorithm that a user can specify either maximum number of nodes or the idle time of a node to be evicted.


Field Summary
 
Fields inherited from class org.jboss.cache.eviction.LRUPolicy (src)
log_
 
Fields inherited from class org.jboss.cache.eviction.BaseEvictionPolicy (src)
cache_, regionManager_
 
Constructor Summary
AopLRUPolicy()
           
 
Method Summary
protected  EvictionAlgorithm (src) getEvictionAlgorithm()
           
protected  boolean isInternalNode(Fqn (src)  fqn)
          Check if this is an JBossInternal node.
 void nodeAdded(Fqn (src)  fqn)
          --- Implementation of TreeCacheListener interface ---
 void nodeModified(Fqn (src)  fqn)
          Called when a node is modified, e.g., one (key, value) pair in the internal map storage has been modified.
 void nodeRemoved(Fqn (src)  fqn)
          Note that this removes all children nodes as well.
 void nodeVisited(Fqn (src)  fqn)
          Override for aop-specific.
protected  void visitChildrenRecursively(Region (src)  region, Fqn (src)  fqn)
           
 
Methods inherited from class org.jboss.cache.eviction.LRUPolicy (src)
cacheStarted, cacheStopped, configure, getWakeupIntervalSeconds, nodeCreated, nodeEvicted, nodeLoaded, viewChange
 
Methods inherited from class org.jboss.cache.eviction.BaseEvictionPolicy (src)
evict, getCacheData, getChildrenNames, getRegions, hasChild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AopLRUPolicy

public AopLRUPolicy()
Method Detail

nodeVisited

public void nodeVisited(Fqn (src)  fqn)
Override for aop-specific. In this case, if a node is visited and it is an aop-node, i.e., it has AopInstance, then all the children nodes are considered visited as well.

Specified by:
nodeVisited in interface TreeCacheListener (src)
Overrides:
nodeVisited in class LRUPolicy (src)
Parameters:
fqn -

visitChildrenRecursively

protected void visitChildrenRecursively(Region (src)  region,
                                        Fqn (src)  fqn)

nodeAdded

public void nodeAdded(Fqn (src)  fqn)
Description copied from class: LRUPolicy (src)
--- Implementation of TreeCacheListener interface ---

Overrides:
nodeAdded in class LRUPolicy (src)

nodeRemoved

public void nodeRemoved(Fqn (src)  fqn)
Note that this removes all children nodes as well. So we will need to put the children nodes into removed queue.

Specified by:
nodeRemoved in interface TreeCacheListener (src)
Overrides:
nodeRemoved in class LRUPolicy (src)
Parameters:
fqn -

nodeModified

public void nodeModified(Fqn (src)  fqn)
Description copied from interface: TreeCacheListener (src)
Called when a node is modified, e.g., one (key, value) pair in the internal map storage has been modified.

Specified by:
nodeModified in interface TreeCacheListener (src)
Overrides:
nodeModified in class LRUPolicy (src)

getEvictionAlgorithm

protected EvictionAlgorithm (src)  getEvictionAlgorithm()
Overrides:
getEvictionAlgorithm in class LRUPolicy (src)

isInternalNode

protected boolean isInternalNode(Fqn (src)  fqn)
Check if this is an JBossInternal node. If it is, no need to proceed since we don't care about it.

Parameters:
fqn -
Returns: