|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.cache.eviction.BaseEvictionPolicy org.jboss.cache.eviction.LRUPolicy
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 | |
protected org.jboss.logging.Logger |
log_
|
Fields inherited from class org.jboss.cache.eviction.BaseEvictionPolicy |
cache_, regionManager_ |
Constructor Summary | |
LRUPolicy()
|
Method Summary | |
void |
cacheStarted(TreeCache cache)
Called when the cache is started. |
void |
cacheStopped(TreeCache cache)
Called when the cache is stopped. |
void |
configure(TreeCache cache)
Method called to configure this implementation. |
protected EvictionAlgorithm |
getEvictionAlgorithm()
|
int |
getWakeupIntervalSeconds()
return eviction thread (if any) wake up interval in seconds. |
void |
nodeAdded(Fqn fqn)
--- Implementation of TreeCacheListener interface --- |
void |
nodeCreated(Fqn fqn)
Called when a node is created |
void |
nodeEvicted(Fqn fqn)
Called when a node is evicted (not the same as remove()). |
void |
nodeLoaded(Fqn fqn)
Called when a node is loaded into memory via the CacheLoader. |
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)
Called when a node is visisted, i.e., get(). |
void |
viewChange(org.jgroups.View new_view)
|
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 |
Field Detail |
protected org.jboss.logging.Logger log_
Constructor Detail |
public LRUPolicy()
Method Detail |
public void nodeAdded(Fqn fqn)
public void nodeRemoved(Fqn fqn)
nodeRemoved
in interface TreeCacheListener
fqn
- public void nodeEvicted(Fqn fqn)
TreeCacheListener
nodeEvicted
in interface TreeCacheListener
fqn
- public void nodeModified(Fqn fqn)
TreeCacheListener
nodeModified
in interface TreeCacheListener
fqn
- public void nodeLoaded(Fqn fqn)
TreeCacheListener
TreeCacheListener.nodeCreated(Fqn)
.
nodeLoaded
in interface TreeCacheListener
public void nodeCreated(Fqn fqn)
TreeCacheListener
nodeCreated
in interface TreeCacheListener
fqn
- public void nodeVisited(Fqn fqn)
TreeCacheListener
nodeVisited
in interface TreeCacheListener
fqn
- public void cacheStarted(TreeCache cache)
TreeCacheListener
cacheStarted
in interface TreeCacheListener
cache
- protected EvictionAlgorithm getEvictionAlgorithm()
public void cacheStopped(TreeCache cache)
TreeCacheListener
cacheStopped
in interface TreeCacheListener
cache
- public void viewChange(org.jgroups.View new_view)
viewChange
in interface TreeCacheListener
public int getWakeupIntervalSeconds()
EvictionPolicy
getWakeupIntervalSeconds
in interface EvictionPolicy
getWakeupIntervalSeconds
in class BaseEvictionPolicy
public void configure(TreeCache cache)
EvictionPolicy
configure
in interface EvictionPolicy
configure
in class BaseEvictionPolicy
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |