org.jboss.ejb3.cache.simple
Class SimpleStatefulCache
java.lang.Object
org.jboss.ejb3.cache.simple.SimpleStatefulCache
- All Implemented Interfaces:
- org.jboss.ejb3.cache.Cache<StatefulBeanContext>, StatefulCache
public class SimpleStatefulCache
- extends java.lang.Object
- implements StatefulCache
Comment
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cacheMap
protected SimpleStatefulCache.CacheMap cacheMap
SimpleStatefulCache
public SimpleStatefulCache()
initialize
public void initialize(EJBContainer container)
throws java.lang.Exception
- Specified by:
initialize in interface StatefulCache
- Throws:
java.lang.Exception
start
public void start()
- Specified by:
start in interface org.jboss.ejb3.cache.Cache<StatefulBeanContext>
stop
public void stop()
- Specified by:
stop in interface org.jboss.ejb3.cache.Cache<StatefulBeanContext>
passivate
protected void passivate(StatefulBeanContext ctx)
create
public StatefulBeanContext create()
create
public StatefulBeanContext create(java.lang.Class<?>[] initTypes,
java.lang.Object[] initValues)
- Specified by:
create in interface org.jboss.ejb3.cache.Cache<StatefulBeanContext>- Specified by:
create in interface StatefulCache
get
public StatefulBeanContext get(java.lang.Object key)
throws javax.ejb.EJBException
- Description copied from interface:
StatefulCache
- Gets the context with the given id.
Same as
getContext(key, true)
- Specified by:
get in interface org.jboss.ejb3.cache.Cache<StatefulBeanContext>- Specified by:
get in interface StatefulCache
- Parameters:
key - the id
- Returns:
- the context
- Throws:
javax.ejb.EJBException
get
public StatefulBeanContext get(java.lang.Object key,
boolean markInUse)
throws javax.ejb.EJBException
- Description copied from interface:
StatefulCache
- Get the context with the given id, optionally marking the context as
being in use.
- Specified by:
get in interface StatefulCache
- Parameters:
key - the context's idmarkInUse - if true, marks any returned context as
being in use. If false, will return
contexts that are marked as removed; otherwise will
throw NoSuchEJBException if such a context is found
- Returns:
- the context
- Throws:
javax.ejb.NoSuchEJBException - if no context with the given id exists or
if the context exists but has been marked
as removed and markInUse is
true
javax.ejb.EJBException
peek
public StatefulBeanContext peek(java.lang.Object key)
throws javax.ejb.NoSuchEJBException
- Specified by:
peek in interface org.jboss.ejb3.cache.Cache<StatefulBeanContext>
- Throws:
javax.ejb.NoSuchEJBException
release
public void release(StatefulBeanContext ctx)
- Specified by:
release in interface org.jboss.ejb3.cache.Cache<StatefulBeanContext>
remove
public void remove(java.lang.Object key)
- Specified by:
remove in interface org.jboss.ejb3.cache.Cache<StatefulBeanContext>
getCacheSize
public int getCacheSize()
- Specified by:
getCacheSize in interface StatefulCache
getTotalSize
public int getTotalSize()
- Specified by:
getTotalSize in interface StatefulCache
getCreateCount
public int getCreateCount()
- Specified by:
getCreateCount in interface StatefulCache
getPassivatedCount
public int getPassivatedCount()
- Specified by:
getPassivatedCount in interface StatefulCache
getRemoveCount
public int getRemoveCount()
- Specified by:
getRemoveCount in interface StatefulCache
getAvailableCount
public int getAvailableCount()
- Specified by:
getAvailableCount in interface StatefulCache
getMaxSize
public int getMaxSize()
- Specified by:
getMaxSize in interface StatefulCache
getCurrentSize
public int getCurrentSize()
- Specified by:
getCurrentSize in interface StatefulCache
isStarted
public boolean isStarted()
- Specified by:
isStarted in interface StatefulCache
getTimeoutTask
protected java.lang.Thread getTimeoutTask()
setTimeoutTask
protected void setTimeoutTask(java.lang.Thread timeoutTask)
getSessionTimeout
protected long getSessionTimeout()
getRemovalTimeout
protected long getRemovalTimeout()
getRemovalTask
protected SimpleStatefulCache.RemovalTimeoutTask getRemovalTask()
setRemovalTask
protected void setRemovalTask(SimpleStatefulCache.RemovalTimeoutTask removalTask)