|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 EntityCache
id
- Object id / primary key
public EnterpriseContext get(Object id) throws RemoteException, NoSuchObjectException
InstanceCache
Implementation should have O(1) complexity.
This method is never called for stateless session beans.
get
in interface InstanceCache
id
- 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)
InstanceCache
Implementation should guarantee proper locking and O(1) complexity.
insert
in interface InstanceCache
instance
- The EnterpriseContext to insert in the cacheInstanceCache.remove(java.lang.Object)
public void release(EnterpriseContext instance)
InstanceCache
release
in interface InstanceCache
instance
- The EnterpriseContext to releaseInstanceCache.get(java.lang.Object)
public void remove(Object id)
InstanceCache
remove
in interface InstanceCache
id
- The pimary key of the bean.InstanceCache.insert(org.jboss.ejb.EnterpriseContext)
public boolean isActive(Object id)
InstanceCache
isActive
in interface InstanceCache
id
- The pimary key of the bean.InstanceCache.insert(org.jboss.ejb.EnterpriseContext)
public long getCacheSize()
InstanceCache
getCacheSize
in interface InstanceCache
public void flush()
InstanceCache
flush
in interface InstanceCache
public void setContainer(Container con)
ContainerPlugin
setContainer
in interface ContainerPlugin
con
- 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.Service
Exception
public void start() throws Exception
start
in interface org.jboss.system.Service
Exception
public void stop()
stop
in interface org.jboss.system.Service
public void destroy()
destroy
in interface org.jboss.system.Service
protected 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 |