org.jboss.ejb.plugins
Class LRUEnterpriseContextCachePolicy
java.lang.Object
|
+--org.jboss.util.LRUCachePolicy
|
+--org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy
- All Implemented Interfaces:
- CachePolicy, EnterpriseContextCachePolicy, Monitorable, Service, XmlLoadable
- Direct Known Subclasses:
- LRUStatefulContextCachePolicy
- public class LRUEnterpriseContextCachePolicy
- extends LRUCachePolicy
- implements EnterpriseContextCachePolicy, XmlLoadable, Monitorable
Least Recently Used cache policy for EnterpriseContexts.
- Version:
- $Revision: 1.7.4.2 $
- Author:
- Simone Bordet (simone.bordet@compaq.com)
- See Also:
AbstractInstanceCache
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 |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LRUEnterpriseContextCachePolicy
public LRUEnterpriseContextCachePolicy(AbstractInstanceCache eic)
- Creates a LRU cache policy object given the instance cache that use
this policy object.
sample
public void sample(java.lang.Object s)
- Description copied from interface:
Monitorable
- Samples the status of the implementor object and register the status
into the snapshot argument.
- Specified by:
sample
in interface Monitorable
start
public void start()
throws java.lang.Exception
- Description copied from class:
LRUCachePolicy
- Starts this cache that is now ready to be used.
- Specified by:
start
in interface Service
- Overrides:
start
in class LRUCachePolicy
- Following copied from class:
org.jboss.util.LRUCachePolicy
- See Also:
LRUCachePolicy.init()
,
LRUCachePolicy.stop()
stop
public void stop()
- Description copied from class:
LRUCachePolicy
- Stops this cache thus
LRUCachePolicy.flush()
ing all cached objects.
After this method is called, a call to LRUCachePolicy.start()
will restart the cache.
- Specified by:
stop
in interface Service
- Overrides:
stop
in class LRUCachePolicy
- Following copied from class:
org.jboss.util.LRUCachePolicy
- See Also:
LRUCachePolicy.start()
,
LRUCachePolicy.destroy()
importXml
public void importXml(org.w3c.dom.Element element)
throws DeploymentException
- Reads from the configuration the parameters for this cache policy, that are
all optionals.
- Specified by:
importXml
in interface XmlLoadable
createList
protected LRUCachePolicy.LRUList createList()
- Description copied from class:
LRUCachePolicy
- Factory method for the linked list used by this cache implementation.
- Overrides:
createList
in class LRUCachePolicy
ageOut
protected void ageOut(LRUCachePolicy.LRUCacheEntry entry)
- Description copied from class:
LRUCachePolicy
- Callback method called when the cache algorithm ages out of the cache
the given entry.
The implementation here is removing the given entry from the cache.
- Overrides:
ageOut
in class LRUCachePolicy
cacheMiss
protected void cacheMiss()
- Description copied from class:
LRUCachePolicy
- Callback method called when a cache miss happens.
- Overrides:
cacheMiss
in class LRUCachePolicy
Copyright © 2000 The JBoss Organization. All Rights Reserved.