@ManagedObject public class DefaultSessionCache extends AbstractSessionCache
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
Container.InheritedListener, Container.Listener
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
EVICT_ON_INACTIVITY, EVICT_ON_SESSION_EXIT, NEVER_EVICT
Constructor and Description |
---|
DefaultSessionCache(SessionHandler manager) |
Modifier and Type | Method and Description |
---|---|
Session |
doDelete(String id)
Remove the session with this identity from the store
|
Session |
doGet(String id)
Get the session matching the key from the cache.
|
Session |
doPutIfAbsent(String id,
Session session)
Put the session into the map if it wasn't already there
|
boolean |
doReplace(String id,
Session oldValue,
Session newValue)
Replace the mapping from id to oldValue with newValue
|
long |
getSessionsCurrent() |
long |
getSessionsMax() |
long |
getSessionsTotal() |
Session |
newSession(HttpServletRequest request,
SessionData data)
Create a new Session for a request.
|
Session |
newSession(SessionData data)
Create a new Session object from pre-existing session data
|
void |
resetStats() |
void |
shutdown() |
add, checkExpiration, checkInactiveSession, commit, contains, delete, exists, get, getEvictionPolicy, getSessionDataStore, getSessionHandler, initialize, isFlushOnResponseCommit, isRemoveUnloadableSessions, isSaveOnCreate, isSaveOnInactiveEviction, newSession, put, release, renewSessionId, setEvictionPolicy, setFlushOnResponseCommit, setRemoveUnloadableSessions, setSaveOnCreate, setSaveOnInactiveEviction, setSessionDataStore, toString
addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, unmanage, updateBean, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
renewSessionId
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, start, stop, stop
dumpContainer, dumpIterable, dumpMapEntries, dumpObjects, dumpSelf, named
public DefaultSessionCache(SessionHandler manager)
manager
- The SessionHandler related to this SessionCache@ManagedAttribute(value="current sessions in cache", readonly=true) public long getSessionsCurrent()
@ManagedAttribute(value="max sessions in cache", readonly=true) public long getSessionsMax()
@ManagedAttribute(value="total sessions in cache", readonly=true) public long getSessionsTotal()
@ManagedOperation(value="reset statistics", impact="ACTION") public void resetStats()
public Session doGet(String id)
AbstractSessionCache
id
- session idpublic Session doPutIfAbsent(String id, Session session)
AbstractSessionCache
id
- the identity of the sessionsession
- the session objectpublic Session doDelete(String id)
AbstractSessionCache
doDelete
in class AbstractSessionCache
id
- the idpublic void shutdown()
public Session newSession(HttpServletRequest request, SessionData data)
AbstractSessionCache
newSession
in class AbstractSessionCache
request
- the requestdata
- the session datapublic Session newSession(SessionData data)
AbstractSessionCache
newSession
in interface SessionCache
newSession
in class AbstractSessionCache
data
- the session datapublic boolean doReplace(String id, Session oldValue, Session newValue)
AbstractSessionCache
id
- the idoldValue
- the old valuenewValue
- the new valueCopyright © 2010 - 2020 Adobe. All Rights Reserved