Top Description Fields Constructors Methods
org.eclipse.jetty.session

public abstract Class AbstractSessionCache

extends ContainerLifeCycle
implements SessionCache
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.session.SessionCache, org.eclipse.jetty.util.component.LifeCycle
Known Direct Subclasses
org.eclipse.jetty.session.DefaultSessionCache, org.eclipse.jetty.session.NullSessionCache
Annotations
@ManagedObject
Imports
java.util.Collections, .HashSet, .Set, java.util.concurrent.atomic.AtomicReference, java.util.function.Function, org.eclipse.jetty.server.Session, org.eclipse.jetty.util.StringUtil, org.eclipse.jetty.util.annotation.ManagedAttribute, .ManagedObject, org.eclipse.jetty.util.component.ContainerLifeCycle, org.eclipse.jetty.util.thread.AutoLock, org.slf4j.Logger, .LoggerFactory

AbstractSessionCache A base implementation of the SessionCache interface for managing a set of Session objects pertaining to a context in memory. This implementation ensures that multiple requests for the same session id always return the same Session object. It will delay writing out a session to the SessionDataStore until the last request exits the session. If the SessionDataStore supports passivation then the session passivation and activation listeners are called appropriately as the session is written. This implementation also supports evicting idle Session objects. An idle Session is one that is still valid, has not expired, but has not been accessed by a request for a configurable amount of time. An idle session will be first passivated before it is evicted from the cache.

Field Summary

Modifier and TypeField and Description
protected SessionContext
_context

Information about the context to which this SessionCache pertains

protected int
_evictionPolicy

When, if ever, to evict sessions: never; only when the last request for them finishes; after inactivity time (expressed as secs)

protected boolean
_flushOnResponseCommit

If true, when a response is about to be committed back to the client, a dirty session will be flushed to the session store.

protected boolean
_invalidateOnShutdown

If true, when the server shuts down, all sessions in the cache will be invalidated before being removed.

protected final SessionManager
_manager

The SessionManager related to this SessionCache

protected boolean
_removeUnloadableSessions

If true, a Session whose data cannot be read will be deleted from the SessionDataStore.

protected boolean
_saveOnCreate

If true, as soon as a new session is created, it will be persisted to the SessionDataStore

protected boolean
_saveOnInactiveEviction

If true, a session that will be evicted from the cache because it has been inactive too long will be saved before being evicted.

protected SessionDataStore
_sessionDataStore

The authoritative source of session data

private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(String
the id
id
,
ManagedSession
the session
session
)

Implements org.eclipse.jetty.session.SessionCache.add.

Add an entirely new session (created by the application calling Request.getSession(true)) to the cache.
public Set<String>
checkExpiration(Set<String>
the session ids to check
candidates
)

Implements org.eclipse.jetty.session.SessionCache.checkExpiration.

Check a list of session ids that belong to potentially expired sessions.
public void
checkInactiveSession(ManagedSession
session to check
session
)

Implements org.eclipse.jetty.session.SessionCache.checkInactiveSession.

Check a session for being inactive and thus being able to be evicted, if eviction is enabled.
public void
commit(ManagedSession session)

Implements org.eclipse.jetty.session.SessionCache.commit.

A response that has accessed this session is about to be returned to the client.
public boolean
contains(String
the session id
id
)

Implements org.eclipse.jetty.session.SessionCache.contains.

Check to see if this cache contains an entry for the session corresponding to the session id.
public ManagedSession
delete(String
the session id
id
)

Implements org.eclipse.jetty.session.SessionCache.delete.

Remove a session object from this store and from any backing store.
protected abstract ManagedSession

Returns:

an existing Session from the cache
doComputeIfAbsent
(String
the session id
id
,
Function<String, ManagedSession>
the function to load the data for the session
mappingFunction
)

Compute the mappingFunction to create a Session object iff the session with the given id isn't already in the map, otherwise return the existing Session.

public abstract ManagedSession

Returns:

Session that was removed or null
doDelete
(String
the id
id
)

Remove the session with this identity from the store

protected abstract ManagedSession

Returns:

the Session object matching the id
doGet
(String
session id
id
)

Get the session matching the key from the cache.

protected abstract Session

Returns:

null if the session wasn't already in the map, or the existing entry otherwise
doPutIfAbsent
(String
the identity of the session
id
,
ManagedSession
the session object
session
)

Put the session into the map if it wasn't already there

protected abstract boolean

Returns:

true if replacement was done
doReplace
(String
the id
id
,
ManagedSession
the old value
oldValue
,
ManagedSession
the new value
newValue
)

Replace the mapping from id to oldValue with newValue

protected void
doStart()

Overrides org.eclipse.jetty.util.component.ContainerLifeCycle.doStart.

Starts the managed lifecycle beans in the order they were added.
protected void
doStop()

Overrides org.eclipse.jetty.util.component.ContainerLifeCycle.doStop.

Stops the managed lifecycle beans in the reverse order they were added.
public boolean
exists(String
the session id
id
)

Implements org.eclipse.jetty.session.SessionCache.exists.

Check to see if a session corresponding to the id exists.
public ManagedSession
get(String
the session id
id
)

Implements org.eclipse.jetty.session.SessionCache.get.

Get a session object.
protected ManagedSession

Returns:

the session if it exists, null otherwise
getAndEnter
(String
The session to retrieve
id
,
boolean
if true, the usage count of the session will be incremented
enter
)

Get a session object.

public int
public SessionDataStore

Returns:

the SessionDataStore or null if there isn't one
getSessionDataStore
()

Implements org.eclipse.jetty.session.SessionCache.getSessionDataStore.

public SessionManager
public void
public boolean
public boolean
public boolean

Returns:

true if sessions that can't be loaded are deleted from the store
isRemoveUnloadableSessions
()

Implements org.eclipse.jetty.session.SessionCache.isRemoveUnloadableSessions.

public boolean
public boolean

Returns:

true if an inactive session will be saved before being evicted
isSaveOnInactiveEviction
()

Implements org.eclipse.jetty.session.SessionCache.isSaveOnInactiveEviction.

Whether we should save a session that has been inactive before we boot it from the cache.
private ManagedSession

Returns:

a Session object filled with data or null if the session doesn't exist
loadSession
(String
the id
id
)

Load the info for the session from the session data store

public abstract ManagedSession

Returns:

a new Session object
newSession
(SessionData
the session data
data
)

Redeclares org.eclipse.jetty.session.SessionCache.newSession.

Create a new Session object from pre-existing session data
public ManagedSession
newSession(String
the unique id associated to the session
id
,
long
the timestamp of the session creation
time
,
long
the max inactive time in milliseconds
maxInactiveMs
)

Implements org.eclipse.jetty.session.SessionCache.newSession.

Create an entirely new Session.
public void
release(ManagedSession
the current session object
session
)

Implements org.eclipse.jetty.session.SessionCache.release.

Finish using the Session object.
public ManagedSession
renewSessionId(String
the current session id
oldId
,
String
the new session id
newId
,
String
the current extended session id
oldExtendedId
,
String
the new extended session id
newExtendedId
)

Implements org.eclipse.jetty.session.SessionCache.renewSessionId.

Change the id of a Session.
protected void
renewSessionId(ManagedSession
the session for which to do the swap
session
,
String
the new id
newId
,
String
the full id plus node id
newExtendedId
)

Swap the id on a session.

public void
setEvictionPolicy(int
-1 is never evict; 0 is evict-on-exit; and any other positive value is the time in seconds that a session can be idle before it can be evicted.
evictionTimeout
)

Implements org.eclipse.jetty.session.SessionCache.setEvictionPolicy.

-1 means we never evict inactive sessions.
public void
setFlushOnResponseCommit(boolean flushOnResponseCommit)

Implements org.eclipse.jetty.session.SessionCache.setFlushOnResponseCommit.

If true, a dirty session will be written to the SessionDataStore just before a response is returned to the client.
public void
setInvalidateOnShutdown(boolean
true invalidate all sessions in cache on server shutdown
invalidateOnShutdown
)

Implements org.eclipse.jetty.session.SessionCache.setInvalidateOnShutdown.

If true, all existing sessions in the cache will be invalidated when the server shuts down.
public void
setRemoveUnloadableSessions(boolean
if true unloadable sessions will be removed from session store
removeUnloadableSessions
)

Implements org.eclipse.jetty.session.SessionCache.setRemoveUnloadableSessions.

If a session's data cannot be loaded from the store without error, remove it from the persistent store.
public void
setSaveOnCreate(boolean
true to immediately save the newly created session
saveOnCreate
)

Implements org.eclipse.jetty.session.SessionCache.setSaveOnCreate.

Whether or not a session that is newly created should be immediately saved.
public void
setSaveOnInactiveEviction(boolean
true if the session should be saved before being evicted
saveOnEvict
)

Implements org.eclipse.jetty.session.SessionCache.setSaveOnInactiveEviction.

Whether or not a a session that is about to be evicted should be saved before being evicted.
public void
setSessionDataStore(SessionDataStore
the SessionDataStore to use
sessionStore
)

Implements org.eclipse.jetty.session.SessionCache.setSessionDataStore.

A SessionDataStore that is the authoritative source of session information.
public String
toString()

Overrides org.eclipse.jetty.util.component.AbstractLifeCycle.toString.

Returns a string representation of the object.
Inherited from org.eclipse.jetty.util.component.ContainerLifeCycle:
addBeanaddBeanaddEventListeneraddManagedcontainsdestroydumpdumpdumpdumpObjectsdumpStdErrgetBeangetBeansgetBeansgetContainedBeansgetContainedBeansisAutoisManagedisUnmanagedmanageremoveBeanremoveBeansremoveEventListenersetBeansstartstopunmanageupdateBeanupdateBeanupdateBeansupdateBeans

Field Detail

_contextback to summary
protected SessionContext _context

Information about the context to which this SessionCache pertains

_evictionPolicyback to summary
protected int _evictionPolicy

When, if ever, to evict sessions: never; only when the last request for them finishes; after inactivity time (expressed as secs)

_flushOnResponseCommitback to summary
protected boolean _flushOnResponseCommit

If true, when a response is about to be committed back to the client, a dirty session will be flushed to the session store.

_invalidateOnShutdownback to summary
protected boolean _invalidateOnShutdown

If true, when the server shuts down, all sessions in the cache will be invalidated before being removed.

_managerback to summary
protected final SessionManager _manager

The SessionManager related to this SessionCache

_removeUnloadableSessionsback to summary
protected boolean _removeUnloadableSessions

If true, a Session whose data cannot be read will be deleted from the SessionDataStore.

_saveOnCreateback to summary
protected boolean _saveOnCreate

If true, as soon as a new session is created, it will be persisted to the SessionDataStore

_saveOnInactiveEvictionback to summary
protected boolean _saveOnInactiveEviction

If true, a session that will be evicted from the cache because it has been inactive too long will be saved before being evicted.

_sessionDataStoreback to summary
protected SessionDataStore _sessionDataStore

The authoritative source of session data

LOGback to summary
private static final Logger LOG

Hides org.eclipse.jetty.util.component.ContainerLifeCycle.LOG.

Constructor Detail

AbstractSessionCacheback to summary
public AbstractSessionCache(SessionManager handler)
Parameters
handler:SessionManager

the SessionManager to use

Method Detail

addback to summary
public void add(String id, ManagedSession session) throws Exception

Implements org.eclipse.jetty.session.SessionCache.add.

Add an entirely new session (created by the application calling Request.getSession(true)) to the cache. The usage count of the fresh session is incremented.

Parameters
id:String

the id

session:ManagedSession

the session

Annotations
@Override
checkExpirationback to summary
public Set<String> checkExpiration(Set<String> candidates)

Implements org.eclipse.jetty.session.SessionCache.checkExpiration.

Doc from org.eclipse.jetty.session.SessionCache.checkExpiration.

Check a list of session ids that belong to potentially expired sessions. The Session in the cache should be checked, but also the SessionDataStore, as that is the authoritative source of all session information.

Parameters
candidates:Set<String>

the session ids to check

Returns:Set<String>

the set of session ids that have actually expired: this can be a superset of the original candidate list.

Annotations
@Override
checkInactiveSessionback to summary
public void checkInactiveSession(ManagedSession session)

Implements org.eclipse.jetty.session.SessionCache.checkInactiveSession.

Check a session for being inactive and thus being able to be evicted, if eviction is enabled.

Parameters
session:ManagedSession

session to check

Annotations
@Override
commitback to summary
public void commit(ManagedSession session) throws Exception

Implements org.eclipse.jetty.session.SessionCache.commit.

A response that has accessed this session is about to be returned to the client. Pass the session to the store to persist, so that any changes will be visible to subsequent requests on the same node (if using NullSessionCache), or on other nodes.

Annotations
@Override
containsback to summary
public boolean contains(String id) throws Exception

Implements org.eclipse.jetty.session.SessionCache.contains.

Check to see if this cache contains an entry for the session corresponding to the session id.

Parameters
id:String

Doc from org.eclipse.jetty.session.SessionCache.contains.

the session id

Returns:boolean

Doc from org.eclipse.jetty.session.SessionCache.contains.

true if a Session object matching the id is present in the cache, false otherwise

Annotations
@Override
Exceptions
Exception:

Doc from org.eclipse.jetty.session.SessionCache.contains.

if any error occurred

deleteback to summary
public ManagedSession delete(String id) throws Exception

Implements org.eclipse.jetty.session.SessionCache.delete.

Remove a session object from this store and from any backing store.

Parameters
id:String

Doc from org.eclipse.jetty.session.SessionCache.delete.

the session id

Returns:ManagedSession

Doc from org.eclipse.jetty.session.SessionCache.delete.

the Session that was removed, null otherwise

Annotations
@Override
Exceptions
Exception:

Doc from org.eclipse.jetty.session.SessionCache.delete.

if any error occurred

doComputeIfAbsentback to summary
protected abstract ManagedSession doComputeIfAbsent(String id, Function<String, ManagedSession> mappingFunction)

Compute the mappingFunction to create a Session object iff the session with the given id isn't already in the map, otherwise return the existing Session. This method is expected to have precisely the same behaviour as java.util.concurrent.ConcurrentHashMap#computeIfAbsent

Parameters
id:String

the session id

mappingFunction:Function<String, ManagedSession>

the function to load the data for the session

Returns:ManagedSession

an existing Session from the cache

doDeleteback to summary
public abstract ManagedSession doDelete(String id)

Remove the session with this identity from the store

Parameters
id:String

the id

Returns:ManagedSession

Session that was removed or null

doGetback to summary
protected abstract ManagedSession doGet(String id)

Get the session matching the key from the cache. Does not load the session.

Parameters
id:String

session id

Returns:ManagedSession

the Session object matching the id

doPutIfAbsentback to summary
protected abstract Session doPutIfAbsent(String id, ManagedSession session)

Put the session into the map if it wasn't already there

Parameters
id:String

the identity of the session

session:ManagedSession

the session object

Returns:Session

null if the session wasn't already in the map, or the existing entry otherwise

doReplaceback to summary
protected abstract boolean doReplace(String id, ManagedSession oldValue, ManagedSession newValue)

Replace the mapping from id to oldValue with newValue

Parameters
id:String

the id

oldValue:ManagedSession

the old value

newValue:ManagedSession

the new value

Returns:boolean

true if replacement was done

doStartback to summary
protected void doStart() throws Exception

Overrides org.eclipse.jetty.util.component.ContainerLifeCycle.doStart.

Doc from org.eclipse.jetty.util.component.ContainerLifeCycle.doStart.

Starts the managed lifecycle beans in the order they were added.

Annotations
@Override
Exceptions
Exception:

Doc from org.eclipse.jetty.util.component.AbstractLifeCycle.doStart.

If there was a problem starting. Will cause a transition to FAILED state

doStopback to summary
protected void doStop() throws Exception

Overrides org.eclipse.jetty.util.component.ContainerLifeCycle.doStop.

Doc from org.eclipse.jetty.util.component.ContainerLifeCycle.doStop.

Stops the managed lifecycle beans in the reverse order they were added.

Annotations
@Override
Exceptions
Exception:

Doc from org.eclipse.jetty.util.component.AbstractLifeCycle.doStop.

If there was a problem stopping. Will cause a transition to FAILED state

existsback to summary
public boolean exists(String id) throws Exception

Implements org.eclipse.jetty.session.SessionCache.exists.

Check to see if a session corresponding to the id exists. This method will first check with the object store. If it doesn't exist in the object store (might be passivated etc), it will check with the data store.

Parameters
id:String

Doc from org.eclipse.jetty.session.SessionCache.exists.

the session id

Returns:boolean

Doc from org.eclipse.jetty.session.SessionCache.exists.

true if the session exists, false otherwise

Annotations
@Override
Exceptions
Exception:
the Exception
getback to summary
public ManagedSession get(String id) throws Exception

Implements org.eclipse.jetty.session.SessionCache.get.

Get a session object. If the session object is not in this session store, try getting the data for it from a SessionDataStore associated with the session manager. The usage count of the session is incremented.

Parameters
id:String

Doc from org.eclipse.jetty.session.SessionCache.get.

the session id

Returns:ManagedSession

Doc from org.eclipse.jetty.session.SessionCache.get.

the Session if one exists, null otherwise

Annotations
@Override
Exceptions
Exception:

Doc from org.eclipse.jetty.session.SessionCache.get.

if any error occurred

getAndEnterback to summary
protected ManagedSession getAndEnter(String id, boolean enter) throws Exception

Get a session object. If the session object is not in this session store, try getting the data for it from a SessionDataStore associated with the session manager.

Parameters
id:String

The session to retrieve

enter:boolean

if true, the usage count of the session will be incremented

Returns:ManagedSession

the session if it exists, null otherwise

Exceptions
Exception:
if the session cannot be loaded
getEvictionPolicyback to summary
public int getEvictionPolicy()

Implements org.eclipse.jetty.session.SessionCache.getEvictionPolicy.

Returns:int

Doc from org.eclipse.jetty.session.SessionCache.getEvictionPolicy.

the eviction policy

Annotations
@ManagedAttribute:session eviction policy
readonly:true
@Override
getSessionDataStoreback to summary
public SessionDataStore getSessionDataStore()

Implements org.eclipse.jetty.session.SessionCache.getSessionDataStore.

Returns:SessionDataStore

the SessionDataStore or null if there isn't one

Annotations
@Override
getSessionManagerback to summary
public SessionManager getSessionManager()

Implements org.eclipse.jetty.session.SessionCache.getSessionManager.

Returns:SessionManager

the SessionManger

Annotations
@Override
initializeback to summary
public void initialize(SessionContext context)

Implements org.eclipse.jetty.session.SessionCache.initialize.

Parameters
context:SessionContext

Doc from org.eclipse.jetty.session.SessionCache.initialize.

the SessionContext to use for this cache

Annotations
@Override
isFlushOnResponseCommitback to summary
public boolean isFlushOnResponseCommit()

Implements org.eclipse.jetty.session.SessionCache.isFlushOnResponseCommit.

Returns:boolean

Doc from org.eclipse.jetty.session.SessionCache.isFlushOnResponseCommit.

true if dirty sessions should be written before the response is committed.

Annotations
@Override
isInvalidateOnShutdownback to summary
public boolean isInvalidateOnShutdown()

Implements org.eclipse.jetty.session.SessionCache.isInvalidateOnShutdown.

Annotations
@Override
isRemoveUnloadableSessionsback to summary
public boolean isRemoveUnloadableSessions()

Implements org.eclipse.jetty.session.SessionCache.isRemoveUnloadableSessions.

Returns:boolean

true if sessions that can't be loaded are deleted from the store

Annotations
@ManagedAttribute:delete unreadable stored sessions
readonly:true
@Override
isSaveOnCreateback to summary
public boolean isSaveOnCreate()

Implements org.eclipse.jetty.session.SessionCache.isSaveOnCreate.

Returns:boolean

Doc from org.eclipse.jetty.session.SessionCache.isSaveOnCreate.

if true the newly created session will be saved immediately

Annotations
@ManagedAttribute:immediately save new sessions
readonly:true
@Override
isSaveOnInactiveEvictionback to summary
public boolean isSaveOnInactiveEviction()

Implements org.eclipse.jetty.session.SessionCache.isSaveOnInactiveEviction.

Whether we should save a session that has been inactive before we boot it from the cache.

Returns:boolean

true if an inactive session will be saved before being evicted

Annotations
@ManagedAttribute:save sessions before evicting from cache
readonly:true
@Override
loadSessionback to summary
private ManagedSession loadSession(String id) throws Exception

Load the info for the session from the session data store

Parameters
id:String

the id

Returns:ManagedSession

a Session object filled with data or null if the session doesn't exist

newSessionback to summary
public abstract ManagedSession newSession(SessionData data)

Redeclares org.eclipse.jetty.session.SessionCache.newSession.

Create a new Session object from pre-existing session data

Parameters
data:SessionData

the session data

Returns:ManagedSession

a new Session object

Annotations
@Override
newSessionback to summary
public ManagedSession newSession(String id, long time, long maxInactiveMs)

Implements org.eclipse.jetty.session.SessionCache.newSession.

Doc from org.eclipse.jetty.session.SessionCache.newSession.

Create an entirely new Session.

Parameters
id:String

the unique id associated to the session

time:long

the timestamp of the session creation

maxInactiveMs:long

the max inactive time in milliseconds

Returns:ManagedSession

a new Session

Annotations
@Override
releaseback to summary
public void release(ManagedSession session) throws Exception

Implements org.eclipse.jetty.session.SessionCache.release.

Finish using the Session object. This should be called when a request exists the session. Only when the last simultaneous request exists the session will any action be taken. If there is a SessionDataStore write the session data through to it. If the SessionDataStore supports passivation, call the passivate/active listeners. If the evictionPolicy == SessionCache.EVICT_ON_SESSION_EXIT then after we have saved the session, we evict it from the cache.

Parameters
session:ManagedSession

Doc from org.eclipse.jetty.session.SessionCache.release.

the current session object

Annotations
@Override
Exceptions
Exception:

Doc from org.eclipse.jetty.session.SessionCache.release.

if any error occurred

renewSessionIdback to summary
public ManagedSession renewSessionId(String oldId, String newId, String oldExtendedId, String newExtendedId) throws Exception

Implements org.eclipse.jetty.session.SessionCache.renewSessionId.

Doc from org.eclipse.jetty.session.SessionCache.renewSessionId.

Change the id of a Session.

Parameters
oldId:String

the current session id

newId:String

the new session id

oldExtendedId:String

the current extended session id

newExtendedId:String

the new extended session id

Returns:ManagedSession

the Session after changing its id

Annotations
@Override
Exceptions
Exception:
if any error occurred
renewSessionIdback to summary
protected void renewSessionId(ManagedSession session, String newId, String newExtendedId) throws Exception

Swap the id on a session.

Parameters
session:ManagedSession

the session for which to do the swap

newId:String

the new id

newExtendedId:String

the full id plus node id

Exceptions
Exception:
if there was a failure saving the change
setEvictionPolicyback to summary
public void setEvictionPolicy(int evictionTimeout)

Implements org.eclipse.jetty.session.SessionCache.setEvictionPolicy.

-1 means we never evict inactive sessions. 0 means we evict a session after the last request for it exits >0 is the number of seconds after which we evict inactive sessions from the cache

Parameters
evictionTimeout:int

Doc from org.eclipse.jetty.session.SessionCache.setEvictionPolicy.

-1 is never evict; 0 is evict-on-exit; and any other positive value is the time in seconds that a session can be idle before it can be evicted.

Annotations
@Override
setFlushOnResponseCommitback to summary
public void setFlushOnResponseCommit(boolean flushOnResponseCommit)

Implements org.eclipse.jetty.session.SessionCache.setFlushOnResponseCommit.

Doc from org.eclipse.jetty.session.SessionCache.setFlushOnResponseCommit.

If true, a dirty session will be written to the SessionDataStore just before a response is returned to the client. This ensures that subsequent requests to either the same node or a different node see the changed session data.

Annotations
@Override
setInvalidateOnShutdownback to summary
public void setInvalidateOnShutdown(boolean invalidateOnShutdown)

Implements org.eclipse.jetty.session.SessionCache.setInvalidateOnShutdown.

Doc from org.eclipse.jetty.session.SessionCache.setInvalidateOnShutdown.

If true, all existing sessions in the cache will be invalidated when the server shuts down. Default is false.

Parameters
invalidateOnShutdown:boolean

true invalidate all sessions in cache on server shutdown

Annotations
@Override
setRemoveUnloadableSessionsback to summary
public void setRemoveUnloadableSessions(boolean removeUnloadableSessions)

Implements org.eclipse.jetty.session.SessionCache.setRemoveUnloadableSessions.

If a session's data cannot be loaded from the store without error, remove it from the persistent store.

Parameters
removeUnloadableSessions:boolean

if true unloadable sessions will be removed from session store

Annotations
@Override
setSaveOnCreateback to summary
public void setSaveOnCreate(boolean saveOnCreate)

Implements org.eclipse.jetty.session.SessionCache.setSaveOnCreate.

Doc from org.eclipse.jetty.session.SessionCache.setSaveOnCreate.

Whether or not a session that is newly created should be immediately saved. If false, a session that is created and invalidated within a single request is never persisted.

Parameters
saveOnCreate:boolean

true to immediately save the newly created session

Annotations
@Override
setSaveOnInactiveEvictionback to summary
public void setSaveOnInactiveEviction(boolean saveOnEvict)

Implements org.eclipse.jetty.session.SessionCache.setSaveOnInactiveEviction.

Doc from org.eclipse.jetty.session.SessionCache.setSaveOnInactiveEviction.

Whether or not a a session that is about to be evicted should be saved before being evicted.

Parameters
saveOnEvict:boolean

true if the session should be saved before being evicted

Annotations
@Override
setSessionDataStoreback to summary
public void setSessionDataStore(SessionDataStore sessionStore)

Implements org.eclipse.jetty.session.SessionCache.setSessionDataStore.

Doc from org.eclipse.jetty.session.SessionCache.setSessionDataStore.

A SessionDataStore that is the authoritative source of session information.

Parameters
sessionStore:SessionDataStore

the SessionDataStore to use

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.eclipse.jetty.util.component.AbstractLifeCycle.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override