SessionDataMap
, SessionDataStore
, Container
, Destroyable
, Dumpable
, LifeCycle
@ManagedObject public class HazelcastSessionDataStore extends AbstractSessionDataStore implements SessionDataStore
AbstractLifeCycle.AbstractLifeCycleListener
Container.InheritedListener, Container.Listener
LifeCycle.Listener
FAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING
_context, _gracePeriodSec, _lastExpiryCheckTime, _savePeriodSec
Constructor | Description |
---|---|
HazelcastSessionDataStore() |
Modifier and Type | Method | Description |
---|---|---|
boolean |
delete(java.lang.String id) |
Delete session data
|
java.util.Set<java.lang.String> |
doGetExpired(java.util.Set<java.lang.String> candidates) |
Implemented by subclasses to resolve which sessions this node
should attempt to expire.
|
void |
doStore(java.lang.String id,
SessionData data,
long lastSaveTime) |
Store the session data persistently.
|
boolean |
exists(java.lang.String id) |
Test if data exists for a given session id.
|
java.lang.String |
getCacheKey(java.lang.String id) |
|
com.hazelcast.core.IMap<java.lang.String,SessionData> |
getSessionDataMap() |
|
void |
initialize(SessionContext context) |
Initialize this data map for the
given context.
|
boolean |
isPassivating() |
True if this type of datastore will passivate session objects
|
SessionData |
load(java.lang.String id) |
Read in session data.
|
void |
setSessionDataMap(com.hazelcast.core.IMap<java.lang.String,SessionData> sessionDataMap) |
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
checkStarted, doStart, getExpired, getGracePeriodSec, getSavePeriodSec, newSessionData, setGracePeriodSec, setSavePeriodSec, store, toString
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, doStop, 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, updateBeans
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, start, stop, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
store
getExpired, newSessionData
public SessionData load(java.lang.String id) throws java.lang.Exception
SessionDataMap
load
in interface SessionDataMap
id
- identity of session to loadjava.lang.Exception
- if unable to load session datapublic boolean delete(java.lang.String id) throws java.lang.Exception
SessionDataMap
delete
in interface SessionDataMap
id
- identity of session to deletejava.lang.Exception
- if unable to delete session datapublic com.hazelcast.core.IMap<java.lang.String,SessionData> getSessionDataMap()
public void setSessionDataMap(com.hazelcast.core.IMap<java.lang.String,SessionData> sessionDataMap)
public void initialize(SessionContext context) throws java.lang.Exception
SessionDataMap
initialize
in interface SessionDataMap
initialize
in class AbstractSessionDataStore
context
- context associatedjava.lang.Exception
- if unable to initialize theSessionDataMap.initialize(org.eclipse.jetty.server.session.SessionContext)
public void doStore(java.lang.String id, SessionData data, long lastSaveTime) throws java.lang.Exception
AbstractSessionDataStore
doStore
in class AbstractSessionDataStore
id
- identity of session to storedata
- info of the sessionlastSaveTime
- time of previous save or 0 if never savedjava.lang.Exception
- if unable to store datapublic boolean isPassivating()
SessionDataStore
isPassivating
in interface SessionDataStore
public java.util.Set<java.lang.String> doGetExpired(java.util.Set<java.lang.String> candidates)
AbstractSessionDataStore
doGetExpired
in class AbstractSessionDataStore
candidates
- the ids of sessions the SessionDataStore thinks has expiredpublic boolean exists(java.lang.String id) throws java.lang.Exception
SessionDataStore
exists
in interface SessionDataStore
id
- Identity of session whose existence should be checkedjava.lang.Exception
- if problem checking existence with persistence layerpublic java.lang.String getCacheKey(java.lang.String id)
Copyright © 1995–2018 Webtide. All rights reserved.