org.jboss.cache.eviction
Class BaseEvictionPolicy

java.lang.Object
  extended byorg.jboss.cache.eviction.BaseEvictionPolicy
All Implemented Interfaces:
EvictionPolicy (src)
Direct Known Subclasses:
DummyEvictionPolicy (src) , LRUPolicy (src)

public class BaseEvictionPolicy
extends java.lang.Object
implements EvictionPolicy (src)

Base class implementation of EvictionPolicy.


Field Summary
protected  TreeCache (src) cache_
           
protected  RegionManager (src) regionManager_
           
 
Constructor Summary
BaseEvictionPolicy()
           
 
Method Summary
 void configure(TreeCache (src)  cache)
          Method called to configure this implementation.
 void evict(Fqn (src)  fqn)
          Evict a node form the underlying cache.
 java.lang.Object getCacheData(Fqn (src)  fqn, java.lang.Object key)
           
 java.util.Set getChildrenNames(Fqn (src)  fqn)
          Return children names as Objects
 Region (src) [] getRegions()
          EvictionPolicy interface implementation
 int getWakeupIntervalSeconds()
          return eviction thread (if any) wake up interval in seconds.
 boolean hasChild(Fqn (src)  fqn)
          Is this a leaf node?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regionManager_

protected RegionManager (src)  regionManager_

cache_

protected TreeCache (src)  cache_
Constructor Detail

BaseEvictionPolicy

public BaseEvictionPolicy()
Method Detail

getRegions

public Region (src) [] getRegions()
EvictionPolicy interface implementation

Specified by:
getRegions in interface EvictionPolicy (src)
Returns:

evict

public void evict(Fqn (src)  fqn)
           throws java.lang.Exception
Description copied from interface: EvictionPolicy (src)
Evict a node form the underlying cache.

Specified by:
evict in interface EvictionPolicy (src)
Parameters:
fqn - Node corresponds to this fqn.
Throws:
java.lang.Exception

getChildrenNames

public java.util.Set getChildrenNames(Fqn (src)  fqn)
Description copied from interface: EvictionPolicy (src)
Return children names as Objects

Specified by:
getChildrenNames in interface EvictionPolicy (src)
Parameters:
fqn -
Returns:
Set of children name as Objects

hasChild

public boolean hasChild(Fqn (src)  fqn)
Description copied from interface: EvictionPolicy (src)
Is this a leaf node?

Specified by:
hasChild in interface EvictionPolicy (src)
Parameters:
fqn -
Returns:

getCacheData

public java.lang.Object getCacheData(Fqn (src)  fqn,
                                     java.lang.Object key)
Specified by:
getCacheData in interface EvictionPolicy (src)

getWakeupIntervalSeconds

public int getWakeupIntervalSeconds()
Description copied from interface: EvictionPolicy (src)
return eviction thread (if any) wake up interval in seconds.

Specified by:
getWakeupIntervalSeconds in interface EvictionPolicy (src)
Returns:

configure

public void configure(TreeCache (src)  cache)
Description copied from interface: EvictionPolicy (src)
Method called to configure this implementation.

Specified by:
configure in interface EvictionPolicy (src)