|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.ejb.plugins.AbstractInstanceCache
org.jboss.ejb.plugins.EntityInstanceCache
Cache subclass for entity beans.
| Field Summary |
| Fields inherited from class org.jboss.ejb.plugins.AbstractInstanceCache |
log |
| Fields inherited from interface org.jboss.monitor.MetricsConstants |
ACTIVITY, APPLICATION, BEAN, BEANCACHE_METRICS, CHECKPOINT, INVOCATION_METRICS, MEMORY_MONITOR, METHOD, PRIMARY_KEY, SYSTEM_METRICS, THREAD_MONITOR, TIME, TYPE |
| Constructor Summary | |
EntityInstanceCache()
|
|
| Method Summary | |
protected EnterpriseContext |
acquireContext()
Acquires an EnterpriseContext from the pool |
protected void |
activate(EnterpriseContext ctx)
Activates the given EnterpriseContext |
protected boolean |
canPassivate(EnterpriseContext ctx)
Returns whether the given context can be passivated or not |
Object |
createCacheKey(Object id)
Returns the key used to cache the context |
void |
destroy()
|
protected void |
freeContext(EnterpriseContext ctx)
Frees the given EnterpriseContext to the pool |
EnterpriseContext |
get(Object id)
Gets a bean instance from this cache given the identity. |
protected Container |
getContainer()
Returns the container for this cache. |
protected Object |
getKey(EnterpriseContext ctx)
Returns the key used by the cache to map the given context |
protected void |
passivate(EnterpriseContext ctx)
Passivates the given EnterpriseContext |
void |
remove(String id)
|
void |
setContainer(Container c)
This callback is set by the container so that the plugin may access it |
protected void |
setKey(Object id,
EnterpriseContext ctx)
Sets the given id as key for the given context |
| Methods inherited from class org.jboss.ejb.plugins.AbstractInstanceCache |
create, doActivate, flush, getCache, getCacheLock, getCachePolicyString, getCacheSize, getPassivatedCount, importXml, insert, isActive, logActivation, logPassivation, release, remove, resetStatistic, retrieveStatistic, sample, start, stop, tryToPassivate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.ejb.InstanceCache |
flush, getCacheSize, insert, isActive, release, remove |
| Methods inherited from interface org.jboss.system.Service |
create, start, stop |
| Methods inherited from interface org.jboss.ejb.plugins.AbstractInstanceCacheMBean |
flush, getCachePolicyString, getCacheSize, getPassivatedCount, remove |
| Constructor Detail |
public EntityInstanceCache()
| Method Detail |
public void setContainer(Container c)
ContainerPlugin
setContainer in interface ContainerPluginc - The container using this plugin. This may be null if the
plugin is being disassociated from a container.public Object createCacheKey(Object id)
EntityCache
createCacheKey in interface EntityCacheid - Object id / primary key
public EnterpriseContext get(Object id)
throws RemoteException,
NoSuchObjectException
InstanceCacheImplementation should have O(1) complexity.
This method is never called for stateless session beans.
get in interface InstanceCacheget in class AbstractInstanceCacheRemoteException
NoSuchObjectException
public void remove(String id)
throws Exception
remove in interface EntityInstanceCacheMBeanExceptionpublic void destroy()
destroy in interface org.jboss.system.Servicedestroy in class AbstractInstanceCacheprotected Object getKey(EnterpriseContext ctx)
AbstractInstanceCache
getKey in class AbstractInstanceCache
protected void setKey(Object id,
EnterpriseContext ctx)
AbstractInstanceCache
setKey in class AbstractInstanceCacheprotected Container getContainer()
AbstractInstanceCache
getContainer in class AbstractInstanceCache
protected void passivate(EnterpriseContext ctx)
throws RemoteException
AbstractInstanceCache
passivate in class AbstractInstanceCacheRemoteException
protected void activate(EnterpriseContext ctx)
throws RemoteException
AbstractInstanceCache
activate in class AbstractInstanceCacheRemoteException
protected EnterpriseContext acquireContext()
throws Exception
AbstractInstanceCache
acquireContext in class AbstractInstanceCacheExceptionprotected void freeContext(EnterpriseContext ctx)
AbstractInstanceCache
freeContext in class AbstractInstanceCacheprotected boolean canPassivate(EnterpriseContext ctx)
AbstractInstanceCache
canPassivate in class AbstractInstanceCache
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||