|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.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 TreeCacheListenerfqn - public void nodeEvicted(Fqn fqn)
TreeCacheListener
nodeEvicted in interface TreeCacheListenerfqn - public void nodeModified(Fqn fqn)
TreeCacheListener
nodeModified in interface TreeCacheListenerfqn - public void nodeLoaded(Fqn fqn)
TreeCacheListenerTreeCacheListener.nodeCreated(Fqn).
nodeLoaded in interface TreeCacheListenerpublic void nodeCreated(Fqn fqn)
TreeCacheListener
nodeCreated in interface TreeCacheListenerfqn - public void nodeVisited(Fqn fqn)
TreeCacheListener
nodeVisited in interface TreeCacheListenerfqn - public void cacheStarted(TreeCache cache)
TreeCacheListener
cacheStarted in interface TreeCacheListenercache - protected EvictionAlgorithm getEvictionAlgorithm()
public void cacheStopped(TreeCache cache)
TreeCacheListener
cacheStopped in interface TreeCacheListenercache - public void viewChange(org.jgroups.View new_view)
viewChange in interface TreeCacheListenerpublic int getWakeupIntervalSeconds()
EvictionPolicy
getWakeupIntervalSeconds in interface EvictionPolicygetWakeupIntervalSeconds in class BaseEvictionPolicypublic void configure(TreeCache cache)
EvictionPolicy
configure in interface EvictionPolicyconfigure in class BaseEvictionPolicy
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||