SessionCache, Container, Destroyable, Dumpable, LifeCycle@ManagedObject public class DefaultSessionCache extends AbstractSessionCache
AbstractLifeCycle.AbstractLifeCycleListenerAbstractSessionCache.PlaceHolderSessionContainer.InheritedListener, Container.ListenerLifeCycle.Listener| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,Session> |
_sessions |
The cache of sessions in a hashmap
|
FAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING_context, _evictionPolicy, _handler, _removeUnloadableSessions, _saveOnCreate, _saveOnInactiveEviction, _sessionDataStoreEVICT_ON_INACTIVITY, EVICT_ON_SESSION_EXIT, NEVER_EVICT| Constructor | Description |
|---|---|
DefaultSessionCache(SessionHandler manager) |
| Modifier and Type | Method | Description |
|---|---|---|
Session |
doDelete(java.lang.String id) |
Remove the session with this identity from the store
|
Session |
doGet(java.lang.String id) |
Get the session matching the key
|
Session |
doPutIfAbsent(java.lang.String id,
Session session) |
Put the session into the map if it wasn't already there
|
boolean |
doReplace(java.lang.String id,
Session oldValue,
Session newValue) |
Replace the mapping from id to oldValue with newValue
|
long |
getSessionsCurrent() |
|
long |
getSessionsMax() |
|
long |
getSessionsTotal() |
|
Session |
newSession(javax.servlet.http.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() |
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopcheckExpiration, checkInactiveSession, contains, delete, doStart, doStop, exists, get, getEvictionPolicy, getSessionDataStore, getSessionHandler, initialize, isRemoveUnloadableSessions, isSaveOnCreate, isSaveOnInactiveEviction, newSession, put, renewSessionId, setEvictionPolicy, setRemoveUnloadableSessions, setSaveOnCreate, setSaveOnInactiveEviction, setSessionDataStore, toStringaddBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, start, stop, stopprotected java.util.concurrent.ConcurrentHashMap<java.lang.String,Session> _sessions
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(java.lang.String id)
AbstractSessionCachedoGet in class AbstractSessionCacheid - session idAbstractSessionCache.doGet(java.lang.String)public Session doPutIfAbsent(java.lang.String id, Session session)
AbstractSessionCachedoPutIfAbsent in class AbstractSessionCacheid - the identity of the sessionsession - the session objectAbstractSessionCache.doPutIfAbsent(java.lang.String, org.eclipse.jetty.server.session.Session)public Session doDelete(java.lang.String id)
AbstractSessionCachedoDelete in class AbstractSessionCacheid - the idAbstractSessionCache.doDelete(java.lang.String)public void shutdown()
public Session newSession(javax.servlet.http.HttpServletRequest request, SessionData data)
AbstractSessionCachenewSession in class AbstractSessionCacherequest - the requestdata - the session dataAbstractSessionCache.newSession(javax.servlet.http.HttpServletRequest, org.eclipse.jetty.server.session.SessionData)public Session newSession(SessionData data)
AbstractSessionCachenewSession in interface SessionCachenewSession in class AbstractSessionCachedata - the session dataAbstractSessionCache.newSession(org.eclipse.jetty.server.session.SessionData)public boolean doReplace(java.lang.String id,
Session oldValue,
Session newValue)
AbstractSessionCachedoReplace in class AbstractSessionCacheid - the idoldValue - the old valuenewValue - the new valueAbstractSessionCache.doReplace(java.lang.String, org.eclipse.jetty.server.session.Session, org.eclipse.jetty.server.session.Session)Copyright © 1995–2018 Webtide. All rights reserved.