Top Description Methods
org.eclipse.jetty.session

public Interface SessionDataStore

extends SessionDataMap
Known Direct Implementers
org.eclipse.jetty.session.AbstractSessionDataStore, org.eclipse.jetty.session.CachingSessionDataStore
Imports
java.util.Set

SessionDataStore A store for the data contained in a Session object. The store would usually be persistent.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if valid, non-expired session exists
exists
(String
Identity of session whose existence should be checked
id
)

Test if data exists for a given session id.

public Set<String>

Returns:

set of session ids
getExpired
(Set<String>
if provided, these are keys of sessions that the SessionDataStore thinks has expired and should be verified by the SessionDataStore
candidates
)

Called periodically, this method should search the data store for sessions that have been expired for a 'reasonable' amount of time.

public boolean

Returns:

true if this store can passivate sessions, false otherwise
isPassivating
()

True if this type of datastore will passivate session objects

public SessionData

Returns:

a new SessionData object
newSessionData
(String
the id
id
,
long
the timestamp when created
created
,
long
the timestamp when accessed
accessed
,
long
the timestamp when last accessed
lastAccessed
,
long
the max inactive time in milliseconds
maxInactiveMs
)

Create a new SessionData

Inherited from org.eclipse.jetty.session.SessionDataMap:
deleteinitializeloadstore

Method Detail

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

Test if data exists for a given session id.

Parameters
id:String

Identity of session whose existence should be checked

Returns:boolean

true if valid, non-expired session exists

Exceptions
Exception:
if problem checking existence with persistence layer
getExpiredback to summary
public Set<String> getExpired(Set<String> candidates)

Called periodically, this method should search the data store for sessions that have been expired for a 'reasonable' amount of time.

Parameters
candidates:Set<String>

if provided, these are keys of sessions that the SessionDataStore thinks has expired and should be verified by the SessionDataStore

Returns:Set<String>

set of session ids

isPassivatingback to summary
public boolean isPassivating()

True if this type of datastore will passivate session objects

Returns:boolean

true if this store can passivate sessions, false otherwise

newSessionDataback to summary
public SessionData newSessionData(String id, long created, long accessed, long lastAccessed, long maxInactiveMs)

Create a new SessionData

Parameters
id:String

the id

created:long

the timestamp when created

accessed:long

the timestamp when accessed

lastAccessed:long

the timestamp when last accessed

maxInactiveMs:long

the max inactive time in milliseconds

Returns:SessionData

a new SessionData object