JBoss API: Class EntityInstanceCache
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jboss.ejb.plugins.AbstractInstanceCache | +--org.jboss.ejb.plugins.EntityInstanceCache
Cache subclass for entity beans.
Inner classes inherited from class org.jboss.ejb.plugins.AbstractInstanceCache |
AbstractInstanceCache.PassivationHelper |
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 |
java.lang.Object |
createCacheKey(java.lang.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(java.lang.Object id)
Gets a bean instance from this cache given the identity. |
protected Container |
getContainer()
Returns the container for this cache. |
protected java.lang.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(java.lang.Object id)
Removes a bean instance from this cache given the identity. |
void |
setContainer(Container c)
This callback is set by the container so that the plugin may access it |
protected void |
setKey(java.lang.Object id,
EnterpriseContext ctx)
Sets the given id as key for the given context |
Methods inherited from class org.jboss.ejb.plugins.AbstractInstanceCache |
getCache, getCacheLock, importXml, init, insert, isActive, isJMSMonitoringEnabled, logActivation, logPassivation, logPassivationPostponed, logPassivationScheduled, release, resetStatistic, retrieveStatistic, sample, schedulePassivation, setJMSMonitoringEnabled, start, stop, unschedulePassivation |
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 |
insert, isActive, release |
Methods inherited from interface org.jboss.util.Service |
init, start, stop |
Constructor Detail |
public EntityInstanceCache()
Method Detail |
public void setContainer(Container c)
ContainerPlugin
setContainer
in interface ContainerPlugin
org.jboss.ejb.ContainerPlugin
con
- the container using this pluginpublic java.lang.Object createCacheKey(java.lang.Object id)
EntityCache
createCacheKey
in interface EntityCache
org.jboss.ejb.EntityCache
id
- Object id / primary keypublic void destroy()
destroy
in interface Service
destroy
in class AbstractInstanceCache
public EnterpriseContext get(java.lang.Object id) throws java.rmi.RemoteException, java.rmi.NoSuchObjectException
InstanceCache
get
in interface InstanceCache
get
in class AbstractInstanceCache
org.jboss.ejb.InstanceCache
id
- the primary key of the beanjava.rmi.RemoteException
- in case of illegal calls (concurrent / reentrant),
NoSuchObjectException if the bean cannot be found.InstanceCache.release(org.jboss.ejb.EnterpriseContext)
public void remove(java.lang.Object id)
InstanceCache
remove
in interface InstanceCache
remove
in class AbstractInstanceCache
org.jboss.ejb.InstanceCache
id
- the pimary key of the beanInstanceCache.insert(org.jboss.ejb.EnterpriseContext)
protected java.lang.Object getKey(EnterpriseContext ctx)
AbstractInstanceCache
getKey
in class AbstractInstanceCache
protected void setKey(java.lang.Object id, EnterpriseContext ctx)
AbstractInstanceCache
setKey
in class AbstractInstanceCache
protected Container getContainer()
AbstractInstanceCache
getContainer
in class AbstractInstanceCache
protected void passivate(EnterpriseContext ctx) throws java.rmi.RemoteException
AbstractInstanceCache
passivate
in class AbstractInstanceCache
protected void activate(EnterpriseContext ctx) throws java.rmi.RemoteException
AbstractInstanceCache
activate
in class AbstractInstanceCache
protected EnterpriseContext acquireContext() throws java.lang.Exception
AbstractInstanceCache
acquireContext
in class AbstractInstanceCache
protected void freeContext(EnterpriseContext ctx)
AbstractInstanceCache
freeContext
in class AbstractInstanceCache
protected boolean canPassivate(EnterpriseContext ctx)
AbstractInstanceCache
canPassivate
in class AbstractInstanceCache
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |