JBoss API: Class LRUEnterpriseContextCachePolicy
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jboss.util.LRUCachePolicy | +--org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy
Least Recently Used cache policy for EnterpriseContexts.
AbstractInstanceCache
Inner Class Summary | |
protected class |
LRUEnterpriseContextCachePolicy.ContextLRUList
Subclass that logs list activity events. |
protected class |
LRUEnterpriseContextCachePolicy.OveragerTask
This TimerTask passivates cached beans that have not been called for a while. |
protected class |
LRUEnterpriseContextCachePolicy.ResizerTask
This TimerTask resizes the cache capacity using the cache miss frequency algorithm, that is the more cache misses we have, the more the cache size is enlarged, and viceversa. |
Inner classes inherited from class org.jboss.util.LRUCachePolicy |
LRUCachePolicy.LRUCacheEntry, LRUCachePolicy.LRUList |
Field Summary | |
protected static Logger |
log
|
protected static java.util.Timer |
tasksTimer
|
Fields inherited from class org.jboss.util.LRUCachePolicy |
m_list, m_map, m_maxCapacity, m_minCapacity |
Constructor Summary | |
LRUEnterpriseContextCachePolicy(AbstractInstanceCache eic)
Creates a LRU cache policy object given the instance cache that use this policy object. |
Method Summary | |
protected void |
ageOut(LRUCachePolicy.LRUCacheEntry entry)
Callback method called when the cache algorithm ages out of the cache the given entry. |
protected void |
cacheMiss()
Callback method called when a cache miss happens. |
protected LRUCachePolicy.LRUList |
createList()
Factory method for the linked list used by this cache implementation. |
void |
destroy()
Destroys the cache that is now unusable. |
void |
importXml(org.w3c.dom.Element element)
Reads from the configuration the parameters for this cache policy, that are all optionals. |
void |
sample(java.lang.Object s)
Samples the status of the implementor object and register the status into the snapshot argument. |
void |
start()
Starts this cache that is now ready to be used. |
void |
stop()
Stops this cache thus LRUCachePolicy.flush() ing all cached objects. |
Methods inherited from class org.jboss.util.LRUCachePolicy |
createCacheEntry, flush, get, init, insert, peek, remove |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static Logger log
protected static java.util.Timer tasksTimer
Constructor Detail |
public LRUEnterpriseContextCachePolicy(AbstractInstanceCache eic)
Method Detail |
public void sample(java.lang.Object s)
Monitorable
sample
in interface Monitorable
public void start() throws java.lang.Exception
LRUCachePolicy
start
in class LRUCachePolicy
org.jboss.util.LRUCachePolicy
LRUCachePolicy.init()
,
LRUCachePolicy.stop()
public void stop()
LRUCachePolicy
LRUCachePolicy.flush()
ing all cached objects. LRUCachePolicy.start()
will restart the cache.stop
in class LRUCachePolicy
org.jboss.util.LRUCachePolicy
LRUCachePolicy.start()
,
LRUCachePolicy.destroy()
public void destroy()
LRUCachePolicy
LRUCachePolicy.init()
ialized and
re-LRUCachePolicy.start()
ed.destroy
in class LRUCachePolicy
org.jboss.util.LRUCachePolicy
LRUCachePolicy.init()
public void importXml(org.w3c.dom.Element element) throws DeploymentException
importXml
in interface XmlLoadable
protected LRUCachePolicy.LRUList createList()
LRUCachePolicy
createList
in class LRUCachePolicy
protected void ageOut(LRUCachePolicy.LRUCacheEntry entry)
LRUCachePolicy
ageOut
in class LRUCachePolicy
protected void cacheMiss()
LRUCachePolicy
cacheMiss
in class LRUCachePolicy
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |