Package org.eclipse.jetty.server.session
Class DefaultSessionCache
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.component.ContainerLifeCycle
-
- org.eclipse.jetty.server.session.AbstractSessionCache
-
- org.eclipse.jetty.server.session.DefaultSessionCache
-
- All Implemented Interfaces:
SessionCache,Container,Destroyable,Dumpable,Dumpable.DumpableContainer,LifeCycle
@ManagedObject @Deprecated(since="2021-05-27") public class DefaultSessionCache extends AbstractSessionCache
Deprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.DefaultSessionCache A session store that keeps its sessions in memory in a hashmap
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Field Summary
-
Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
-
Fields inherited from interface org.eclipse.jetty.server.session.SessionCache
EVICT_ON_INACTIVITY, EVICT_ON_SESSION_EXIT, NEVER_EVICT
-
-
Constructor Summary
Constructors Constructor Description DefaultSessionCache(SessionHandler manager)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SessiondoDelete(java.lang.String id)Deprecated.Remove the session with this identity from the storeSessiondoGet(java.lang.String id)Deprecated.SessiondoPutIfAbsent(java.lang.String id, Session session)Deprecated.booleandoReplace(java.lang.String id, Session oldValue, Session newValue)Deprecated.longgetSessionsCurrent()Deprecated.longgetSessionsMax()Deprecated.longgetSessionsTotal()Deprecated.SessionnewSession(HttpServletRequest request, SessionData data)Deprecated.Create a new Session for a request.SessionnewSession(SessionData data)Deprecated.Create a new Session object from pre-existing session datavoidresetStats()Deprecated.voidshutdown()Deprecated.-
Methods inherited from class org.eclipse.jetty.server.session.AbstractSessionCache
add, checkExpiration, checkInactiveSession, commit, contains, delete, exists, get, getEvictionPolicy, getSessionDataStore, getSessionHandler, initialize, isFlushOnResponseCommit, isInvalidateOnShutdown, isRemoveUnloadableSessions, isSaveOnCreate, isSaveOnInactiveEviction, newSession, put, release, renewSessionId, setEvictionPolicy, setFlushOnResponseCommit, setInvalidateOnShutdown, setRemoveUnloadableSessions, setSaveOnCreate, setSaveOnInactiveEviction, setSessionDataStore, toString
-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
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
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Methods inherited from interface org.eclipse.jetty.util.component.LifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Methods inherited from interface org.eclipse.jetty.server.session.SessionCache
renewSessionId
-
-
-
-
Constructor Detail
-
DefaultSessionCache
public DefaultSessionCache(SessionHandler manager)
Deprecated.- Parameters:
manager- The SessionHandler related to this SessionCache
-
-
Method Detail
-
getSessionsCurrent
@ManagedAttribute(value="current sessions in cache", readonly=true) public long getSessionsCurrent()
Deprecated.- Returns:
- the number of sessions in the cache
-
getSessionsMax
@ManagedAttribute(value="max sessions in cache", readonly=true) public long getSessionsMax()
Deprecated.- Returns:
- the max number of sessions in the cache
-
getSessionsTotal
@ManagedAttribute(value="total sessions in cache", readonly=true) public long getSessionsTotal()
Deprecated.- Returns:
- a running total of sessions in the cache
-
resetStats
@ManagedOperation(value="reset statistics", impact="ACTION") public void resetStats()
Deprecated.
-
doGet
public Session doGet(java.lang.String id)
Deprecated.
-
doDelete
public Session doDelete(java.lang.String id)
Deprecated.Description copied from class:AbstractSessionCacheRemove the session with this identity from the store- Specified by:
doDeletein classAbstractSessionCache- Parameters:
id- the id- Returns:
- Session that was removed or null
-
shutdown
public void shutdown()
Deprecated.
-
newSession
public Session newSession(HttpServletRequest request, SessionData data)
Deprecated.Description copied from class:AbstractSessionCacheCreate a new Session for a request.- Specified by:
newSessionin classAbstractSessionCache- Parameters:
request- the requestdata- the session data- Returns:
- the new session
-
newSession
public Session newSession(SessionData data)
Deprecated.Description copied from class:AbstractSessionCacheCreate a new Session object from pre-existing session data- Specified by:
newSessionin interfaceSessionCache- Specified by:
newSessionin classAbstractSessionCache- Parameters:
data- the session data- Returns:
- a new Session object
-
-