public class HashSessionIdManager extends AbstractSessionIdManager
AbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.Listener_random, _weakRandom, _workerName_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING| Constructor and Description |
|---|
HashSessionIdManager() |
HashSessionIdManager(java.util.Random random) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSession(javax.servlet.http.HttpSession session)
Add a session to the list of known sessions for a given ID.
|
protected void |
doStart() |
protected void |
doStop() |
java.lang.String |
getClusterId(java.lang.String nodeId)
Get the session ID without any worker ID.
|
java.lang.String |
getNodeId(java.lang.String clusterId,
javax.servlet.http.HttpServletRequest request)
Get the session ID with any worker ID.
|
java.util.Collection<javax.servlet.http.HttpSession> |
getSession(java.lang.String id) |
java.util.Collection<java.lang.String> |
getSessions() |
boolean |
idInUse(java.lang.String id) |
void |
invalidateAll(java.lang.String id)
Call
HttpSession.invalidate() on all known sessions for the given id. |
void |
removeSession(javax.servlet.http.HttpSession session)
Remove session from the list of known sessions for a given ID.
|
getRandom, getWorkerName, initRandom, newSessionId, setRandom, setWorkerNameaddLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic HashSessionIdManager()
public HashSessionIdManager(java.util.Random random)
public java.util.Collection<java.lang.String> getSessions()
public java.util.Collection<javax.servlet.http.HttpSession> getSession(java.lang.String id)
public java.lang.String getNodeId(java.lang.String clusterId,
javax.servlet.http.HttpServletRequest request)
clusterId - request - public java.lang.String getClusterId(java.lang.String nodeId)
nodeId - the node idprotected void doStart()
throws java.lang.Exception
doStart in class AbstractSessionIdManagerjava.lang.Exceptionprotected void doStop()
throws java.lang.Exception
doStop in class AbstractSessionIdManagerjava.lang.Exceptionpublic boolean idInUse(java.lang.String id)
id - The session ID without any cluster node extensionSessionIdManager.idInUse(String)public void addSession(javax.servlet.http.HttpSession session)
SessionIdManagersession - The sessionSessionIdManager.addSession(HttpSession)public void removeSession(javax.servlet.http.HttpSession session)
SessionIdManagerpublic void invalidateAll(java.lang.String id)
SessionIdManagerHttpSession.invalidate() on all known sessions for the given id.id - The session ID without any cluster node extensionSessionIdManager.invalidateAll(String)Copyright © 2013 FuseSource, Corp.. All Rights Reserved.