SessionDataMap
, SessionDataStore
, org.eclipse.jetty.util.component.LifeCycle
@ManagedObject public class FileSessionDataStore extends AbstractSessionDataStore
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING
_context, _gracePeriodSec, _lastExpiryCheckTime
Constructor | Description |
---|---|
FileSessionDataStore() |
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.
|
protected void |
doStart() |
|
protected void |
doStop() |
|
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.io.File |
getStoreDir() |
|
void |
initializeStore() |
|
boolean |
isDeleteUnrestorableFiles() |
|
boolean |
isPassivating() |
True if this type of datastore will passivate session objects
|
SessionData |
load(java.lang.String id) |
Read in session data.
|
void |
setDeleteUnrestorableFiles(boolean deleteUnrestorableFiles) |
|
void |
setStoreDir(java.io.File storeDir) |
|
java.lang.String |
toString() |
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
checkStarted, getExpired, getGracePeriodSec, initialize, newSessionData, setGracePeriodSec, store
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
protected void doStart() throws java.lang.Exception
doStart
in class AbstractSessionDataStore
java.lang.Exception
protected void doStop() throws java.lang.Exception
doStop
in class org.eclipse.jetty.util.component.ContainerLifeCycle
java.lang.Exception
@ManagedAttribute(value="dir where sessions are stored", readonly=true) public java.io.File getStoreDir()
public void setStoreDir(java.io.File storeDir)
public boolean isDeleteUnrestorableFiles()
public void setDeleteUnrestorableFiles(boolean deleteUnrestorableFiles)
public boolean delete(java.lang.String id) throws java.lang.Exception
SessionDataMap
id
- identity of session to deletejava.lang.Exception
- if unable to delete session dataSessionDataMap.delete(java.lang.String)
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 expiredSessionDataStore.getExpired(Set)
public SessionData load(java.lang.String id) throws java.lang.Exception
SessionDataMap
id
- identity of session to loadjava.lang.Exception
- if unable to load session dataSessionDataMap.load(java.lang.String)
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 dataAbstractSessionDataStore.doStore(java.lang.String, org.eclipse.jetty.server.session.SessionData, long)
public void initializeStore()
@ManagedAttribute(value="are sessions serialized by this store", readonly=true) public boolean isPassivating()
SessionDataStore
SessionDataStore.isPassivating()
public boolean exists(java.lang.String id) throws java.lang.Exception
SessionDataStore
id
- Identity of session whose existance should be checkedjava.lang.Exception
- if problem checking existance with persistence layerSessionDataStore.exists(java.lang.String)
public java.lang.String toString()
toString
in class AbstractSessionDataStore
Object.toString()
Copyright © 1995–2018 Webtide. All rights reserved.