public class FileSessionDataStore extends AbstractSessionDataStore
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
Container.InheritedListener, Container.Listener
_context, _gracePeriodSec, _lastExpiryCheckTime
FAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING
Constructor and Description |
---|
FileSessionDataStore() |
Modifier and Type | Method and Description |
---|---|
boolean |
delete(String id)
Delete session data
|
Set<String> |
doGetExpired(Set<String> candidates)
Implemented by subclasses to resolve which sessions this node
should attempt to expire.
|
protected void |
doStart()
Starts the managed lifecycle beans in the order they were added.
|
protected void |
doStop()
Stops the managed lifecycle beans in the reverse order they were added.
|
void |
doStore(String id,
SessionData data,
long lastSaveTime)
Store the session data persistently.
|
boolean |
exists(String id)
Test if data exists for a given session id.
|
File |
getStoreDir() |
void |
initializeStore() |
boolean |
isDeleteUnrestorableFiles() |
boolean |
isPassivating()
True if this type of datastore will passivate session objects
|
SessionData |
load(String id)
Read in session data.
|
void |
setDeleteUnrestorableFiles(boolean deleteUnrestorableFiles) |
void |
setStoreDir(File storeDir) |
String |
toString() |
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
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
protected void doStart() throws Exception
ContainerLifeCycle
doStart
in class AbstractSessionDataStore
Exception
protected void doStop() throws Exception
ContainerLifeCycle
doStop
in class ContainerLifeCycle
Exception
public File getStoreDir()
public void setStoreDir(File storeDir)
public boolean isDeleteUnrestorableFiles()
public void setDeleteUnrestorableFiles(boolean deleteUnrestorableFiles)
public boolean delete(String id) throws Exception
SessionDataMap
id
- identity of session to deleteException
- if unable to delete session dataSessionDataMap.delete(java.lang.String)
public Set<String> doGetExpired(Set<String> candidates)
AbstractSessionDataStore
doGetExpired
in class AbstractSessionDataStore
candidates
- the ids of sessions the SessionDataStore thinks has expiredSessionDataStore.getExpired(Set)
public SessionData load(String id) throws Exception
SessionDataMap
id
- identity of session to loadException
- if unable to load session dataSessionDataMap.load(java.lang.String)
public void doStore(String id, SessionData data, long lastSaveTime) throws Exception
AbstractSessionDataStore
doStore
in class AbstractSessionDataStore
id
- identity of session to storedata
- info of the sessionlastSaveTime
- time of previous save or 0 if never savedException
- if unable to store dataAbstractSessionDataStore.doStore(java.lang.String, org.eclipse.jetty.server.session.SessionData, long)
public void initializeStore()
public boolean isPassivating()
SessionDataStore
SessionDataStore.isPassivating()
public boolean exists(String id) throws Exception
SessionDataStore
id
- Identity of session whose existance should be checkedException
- if problem checking existance with persistence layerSessionDataStore.exists(java.lang.String)
public String toString()
toString
in class AbstractSessionDataStore
AbstractSessionDataStore.toString()
Copyright © 1995–2017 Webtide. All rights reserved.