public class GCloudSessionIdManager extends AbstractSessionIdManager
AbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.Listener| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_IDLE_EXPIRY_MULTIPLE |
static String |
KIND |
_random, _reseed, _weakRandom, _workerAttr, _workerNameFAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING| Constructor and Description |
|---|
GCloudSessionIdManager(Server server) |
GCloudSessionIdManager(Server server,
Random random) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSession(javax.servlet.http.HttpSession session)
Remember a new in-use session id.
|
protected void |
delete(String id)
Remove a session id from the cluster.
|
protected void |
doStart()
Start the id manager.
|
protected void |
doStop()
Stop the id manager
|
protected boolean |
exists(String id)
Ask the datastore if a particular id exists.
|
boolean |
idInUse(String id)
Check to see if the given session id is being
used by a session in any context.
|
protected void |
insert(String id)
Put a session id into the cluster.
|
void |
invalidateAll(String id)
Remove a session id.
|
protected com.google.cloud.datastore.Key |
makeKey(String id)
Generate a unique key from the session id.
|
void |
removeSession(javax.servlet.http.HttpSession session)
Remove a session id from the list of in-use ids.
|
void |
renewSessionId(String oldClusterId,
String oldNodeId,
javax.servlet.http.HttpServletRequest request)
Change a session id.
|
getClusterId, getNodeId, getRandom, getReseed, getWorkerName, initRandom, newSessionId, newSessionId, setRandom, setReseed, setWorkerNameaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic static final int DEFAULT_IDLE_EXPIRY_MULTIPLE
public static final String KIND
public GCloudSessionIdManager(Server server)
server - protected void doStart()
throws Exception
doStart in class AbstractSessionIdManagerExceptionAbstractSessionIdManager.doStart()protected void doStop()
throws Exception
doStop in class AbstractSessionIdManagerExceptionAbstractSessionIdManager.doStop()public boolean idInUse(String id)
id - The session ID without any cluster node extensionSessionIdManager.idInUse(java.lang.String)public void addSession(javax.servlet.http.HttpSession session)
session - The sessionSessionIdManager.addSession(javax.servlet.http.HttpSession)public void removeSession(javax.servlet.http.HttpSession session)
session - the session to removeSessionIdManager.removeSession(javax.servlet.http.HttpSession)public void invalidateAll(String id)
id - The session ID without any cluster node extensionSessionIdManager.invalidateAll(java.lang.String)public void renewSessionId(String oldClusterId, String oldNodeId, javax.servlet.http.HttpServletRequest request)
renewSessionId in interface SessionIdManagerrenewSessionId in class AbstractSessionIdManageroldClusterId - the old cluster idoldNodeId - the old node idrequest - the request containing the sessionAbstractSessionIdManager.renewSessionId(java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest)protected boolean exists(String id)
id - the session id to check for existenceprotected void insert(String id)
id - the id to mark as in useprotected void delete(String id)
id - the id to removeprotected com.google.cloud.datastore.Key makeKey(String id)
id - the id of the sessionCopyright © 1995–2021 Webtide. All rights reserved.