|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jboss.ejb.plugins.EnterpriseInstanceCache | +--org.jboss.ejb.plugins.EntityInstanceCache
Cache subclass for entity beans.
Inner classes inherited from class org.jboss.ejb.plugins.EnterpriseInstanceCache |
EnterpriseInstanceCache.PassivationHelper |
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 |
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 |
java.lang.Object |
getLock(java.lang.Object id)
Creates (if necessary) and returns an object used as mutex to sync passivation activity with other activities. |
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. |
protected void |
removeLock(java.lang.Object id)
Removes the mutex associated with the given id. |
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.EnterpriseInstanceCache |
destroy, getCache, getCacheLock, importXml, init, insert, release, schedulePassivation, 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, release |
Methods inherited from interface org.jboss.util.Service |
destroy, 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)
EntityInstanceCache
createCacheKey
in interface EntityInstanceCache
org.jboss.ejb.EntityInstanceCache
id
- Object id / primary keypublic EnterpriseContext get(java.lang.Object id) throws java.rmi.RemoteException, java.rmi.NoSuchObjectException
InstanceCache
get
in interface InstanceCache
get
in class EnterpriseInstanceCache
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 EnterpriseInstanceCache
org.jboss.ejb.InstanceCache
id
- the pimary key of the beanInstanceCache.insert(org.jboss.ejb.EnterpriseContext)
public java.lang.Object getLock(java.lang.Object id)
EnterpriseInstanceCache
getLock
in class EnterpriseInstanceCache
protected void removeLock(java.lang.Object id)
EnterpriseInstanceCache
removeLock
in class EnterpriseInstanceCache
protected java.lang.Object getKey(EnterpriseContext ctx)
EnterpriseInstanceCache
getKey
in class EnterpriseInstanceCache
protected void setKey(java.lang.Object id, EnterpriseContext ctx)
EnterpriseInstanceCache
setKey
in class EnterpriseInstanceCache
protected Container getContainer()
EnterpriseInstanceCache
getContainer
in class EnterpriseInstanceCache
protected void passivate(EnterpriseContext ctx) throws java.rmi.RemoteException
EnterpriseInstanceCache
passivate
in class EnterpriseInstanceCache
protected void activate(EnterpriseContext ctx) throws java.rmi.RemoteException
EnterpriseInstanceCache
activate
in class EnterpriseInstanceCache
protected EnterpriseContext acquireContext() throws java.lang.Exception
EnterpriseInstanceCache
acquireContext
in class EnterpriseInstanceCache
protected void freeContext(EnterpriseContext ctx)
EnterpriseInstanceCache
freeContext
in class EnterpriseInstanceCache
protected boolean canPassivate(EnterpriseContext ctx)
EnterpriseInstanceCache
canPassivate
in class EnterpriseInstanceCache
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |