站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 Cache API Documentation 英文版文档

AopLRUPolicy (JBossCache API) - JBoss 4.0.1 sp1 Cache API Documentation 英文版文档


org.jboss.cache.eviction
Class AopLRUPolicy

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

public class AopLRUPolicy
extends LRUPolicy
implements AopEvictionPolicy

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.

Author:
Ben Wang 02-2004

Field Summary
 
Fields inherited from class org.jboss.cache.eviction.LRUPolicy
log_
 
Fields inherited from class org.jboss.cache.eviction.BaseEvictionPolicy
cache_, regionManager_
 
Constructor Summary
AopLRUPolicy()
           
 
Method Summary
protected  EvictionAlgorithm getEvictionAlgorithm()
           
protected  boolean isInternalNode(Fqn fqn)
          Check if this is an JBossInternal node.
 void nodeAdded(Fqn fqn)
          --- Implementation of TreeCacheListener interface ---
 void nodeModified(Fqn fqn)
          Called when a node is modified, e.g., one (key, value) pair in the internal map storage has been modified.
 void nodeRemoved(Fqn fqn)
          Note that this removes all children nodes as well.
 void nodeVisited(Fqn fqn)
          Override for aop-specific.
protected  void visitChildrenRecursively(Region region, Fqn fqn)
           
 
Methods inherited from class org.jboss.cache.eviction.LRUPolicy
cacheStarted, cacheStopped, configure, getWakeupIntervalSeconds, nodeCreated, nodeEvicted, nodeLoaded, viewChange
 
Methods inherited from class org.jboss.cache.eviction.BaseEvictionPolicy
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 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
Overrides:
nodeVisited in class LRUPolicy
Parameters:
fqn -

visitChildrenRecursively

protected void visitChildrenRecursively(Region region,
                                        Fqn fqn)

nodeAdded

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

Overrides:
nodeAdded in class LRUPolicy

nodeRemoved

public void nodeRemoved(Fqn 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
Overrides:
nodeRemoved in class LRUPolicy
Parameters:
fqn -

nodeModified

public void nodeModified(Fqn fqn)
Description copied from interface: TreeCacheListener
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
Overrides:
nodeModified in class LRUPolicy

getEvictionAlgorithm

protected EvictionAlgorithm getEvictionAlgorithm()
Overrides:
getEvictionAlgorithm in class LRUPolicy

isInternalNode

protected boolean isInternalNode(Fqn 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:


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.