|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jboss.ejb.plugins.PerTxEntityInstanceCache
Per transaction instance cache.
| Field Summary |
| Constructor Summary | |
PerTxEntityInstanceCache()
|
|
| Method Summary | |
protected boolean |
canPassivate(EnterpriseContext ctx)
|
void |
create()
|
Object |
createCacheKey(Object id)
Returns the key used to cache the context |
void |
destroy()
|
void |
flush()
Flush the cache. |
EnterpriseContext |
get(Object id)
Gets a bean instance from this cache given the identity. |
long |
getCacheSize()
Get the current cache size |
void |
insert(EnterpriseContext instance)
Inserts an active bean instance after creation or activation. |
boolean |
isActive(Object id)
Checks whether an instance corresponding to a particular id is active. |
void |
release(EnterpriseContext instance)
Releases the given bean instance from this cache. |
void |
remove(Object id)
Removes a bean instance from this cache given the identity. |
void |
setContainer(Container con)
This callback is set by the container so that the plugin may access it |
void |
start()
|
void |
stop()
|
protected void |
tryToPassivate(EnterpriseContext instance)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PerTxEntityInstanceCache()
| Method Detail |
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 InstanceCacheid - The primary key of the bean .
NoSuchObjectException - if the bean cannot be found.
RemoteException - In case of illegal calls (concurrent /
reentrant)InstanceCache.release(org.jboss.ejb.EnterpriseContext)public void insert(EnterpriseContext instance)
InstanceCacheImplementation should guarantee proper locking and O(1) complexity.
insert in interface InstanceCacheinstance - The EnterpriseContext to insert in the cacheInstanceCache.remove(java.lang.Object)public void release(EnterpriseContext instance)
InstanceCache
release in interface InstanceCacheinstance - The EnterpriseContext to releaseInstanceCache.get(java.lang.Object)public void remove(Object id)
InstanceCache
remove in interface InstanceCacheid - The pimary key of the bean.InstanceCache.insert(org.jboss.ejb.EnterpriseContext)public boolean isActive(Object id)
InstanceCache
isActive in interface InstanceCacheid - The pimary key of the bean.InstanceCache.insert(org.jboss.ejb.EnterpriseContext)public long getCacheSize()
InstanceCache
getCacheSize in interface InstanceCachepublic void flush()
InstanceCache
flush in interface InstanceCachepublic void setContainer(Container con)
ContainerPlugin
setContainer in interface ContainerPlugincon - The container using this plugin. This may be null if the
plugin is being disassociated from a container.
public void create()
throws Exception
create in interface org.jboss.system.ServiceException
public void start()
throws Exception
start in interface org.jboss.system.ServiceExceptionpublic void stop()
stop in interface org.jboss.system.Servicepublic void destroy()
destroy in interface org.jboss.system.Serviceprotected void tryToPassivate(EnterpriseContext instance)
protected boolean canPassivate(EnterpriseContext ctx)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||