当前页面:
在线文档首页 >
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
org.jboss.cache.eviction.BaseEvictionPolicy
org.jboss.cache.eviction.LRUPolicy
org.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
| Fields inherited from class org.jboss.cache.eviction.LRUPolicy |
log_ |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AopLRUPolicy
public AopLRUPolicy()
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.