org.jboss.cache.eviction
Class AopLRUPolicy
java.lang.Object
org.jboss.cache.eviction.BaseEvictionPolicy (src)
org.jboss.cache.eviction.LRUPolicy (src)
org.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.
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 (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: