HouseKeeper
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| protected HouseKeeper | |
| private final AutoLock | |
| protected boolean | |
| protected Random | |
| protected long | |
| protected Server | |
| protected boolean | |
| protected String | |
| protected String | |
| protected static final AtomicLong | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public | |
| public | DefaultSessionIdManager(Server
the server associated with the id manager server, Random a random number generator to use for ids random)
|
| Modifier and Type | Method and Description |
|---|---|
| protected void | doStart()
Overrides org. |
| protected void | doStop()
Overrides org. |
| public void | expireAll(String
The session ID without any cluster node extension id)Implements org. |
| public String | Returns: sessionId plus any worker ID.the cluster id clusterId, Request the request request)Implements org. |
| public String | Returns: sessionId without any worker ID.the session id with the worker extension extendedId)Implements org. |
| public Random | |
| public long | |
| public Server | Returns: the server associated with this id managerGet the server associated with this id manager. |
| public HouseKeeper | Returns: the housekeeperImplements org. |
| public Set | Returns: all SessionManagers that are runningGet SessionManager for every context. |
| public String | Returns: name or nullImplements org. |
| public void | |
| public void | invalidateAll(String
the session id id)Implements org. |
| public boolean | isIdInUse(String
The plain session ID (ie no workername extension) id)Implements org. |
| public String | newSessionId(Request
the request asking for a new session request, String the session id requested by the session requestedId, long the timestamp for when the session was created created)Implements org. |
| public String | |
| public String | renewSessionId(String
the old plain session id oldClusterId, String the old fully qualified id oldNodeId, Request the request containing the session request)Implements org. |
| public void | |
| public void | |
| public void | setReseed(long
If non zero then when a random long modulo the reseed value == 1, the reseed)SecureRandom will be reseeded.Set the reseed probability. |
| public void | |
| public void | setSessionHouseKeeper(HouseKeeper
the housekeeper houseKeeper)Implements org. |
| public void | setWorkerName(String
the name of the worker, if null it is coerced to empty string workerName)Set the workername. |
| public String | toString()
Overrides org. |
| __NEW_SESSION_ID | back to summary |
|---|---|
| public static final String __NEW_SESSION_ID | |
| _houseKeeper | back to summary |
|---|---|
| protected HouseKeeper _houseKeeper | |
| _lock | back to summary |
|---|---|
| private final AutoLock _lock Hides org. | |
| _ownHouseKeeper | back to summary |
|---|---|
| protected boolean _ownHouseKeeper | |
| _random | back to summary |
|---|---|
| protected Random _random | |
| _reseed | back to summary |
|---|---|
| protected long _reseed | |
| _server | back to summary |
|---|---|
| protected Server _server | |
| _weakRandom | back to summary |
|---|---|
| protected boolean _weakRandom | |
| _workerAttr | back to summary |
|---|---|
| protected String _workerAttr | |
| _workerName | back to summary |
|---|---|
| protected String _workerName | |
| COUNTER | back to summary |
|---|---|
| protected static final AtomicLong COUNTER | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG Hides org. | |
| DefaultSessionIdManager | back to summary |
|---|---|
public DefaultSessionIdManager(Server server)
| |
| DefaultSessionIdManager | back to summary |
|---|---|
| public DefaultSessionIdManager(Server server, Random random) | |
| doStart | back to summary |
|---|---|
| protected void doStart() throws Exception Overrides org. Doc from org. Starts the managed lifecycle beans in the order they were added.
| |
| doStop | back to summary |
|---|---|
| protected void doStop() throws Exception Overrides org. Doc from org. Stops the managed lifecycle beans in the reverse order they were added.
| |
| expireAll | back to summary |
|---|---|
| public void expireAll(String id) Implements org. Remove an id from use by telling all contexts to remove a session with this id.
| |
| getExtendedId | back to summary |
|---|---|
| public String getExtendedId(String clusterId, Request request) Implements org. Get the session ID with any worker ID. | |
| getId | back to summary |
|---|---|
| public String getId(String extendedId) Implements org. Get the session ID without any worker ID. | |
| getRandom | back to summary |
|---|---|
| public Random getRandom() Get the random number generator.
| |
| getReseed | back to summary |
|---|---|
| public long getReseed() Get the reseed probability.
| |
| getServer | back to summary |
|---|---|
| public Server getServer() Get the server associated with this id manager.
| |
| getSessionHouseKeeper | back to summary |
|---|---|
| public HouseKeeper getSessionHouseKeeper() Implements org.
| |
| getSessionManagers | back to summary |
|---|---|
| public Set Get SessionManager for every context.
| |
| getWorkerName | back to summary |
|---|---|
| public String getWorkerName() Implements org. Get the workname. If set, the workername is dot appended to the session ID and can be used to assist session affinity in a load balancer.
| |
| initRandom | back to summary |
|---|---|
| public void initRandom() Set up a random number generator for the sessionids. By preference, use a SecureRandom but allow to be injected. | |
| invalidateAll | back to summary |
|---|---|
| public void invalidateAll(String id) Implements org. Doc from org. Invalidate all sessions on all contexts that share the same id. | |
| isIdInUse | back to summary |
|---|---|
| public boolean isIdInUse(String id) Implements org.
| |
| newSessionId | back to summary |
|---|---|
| public String newSessionId(Request request, String requestedId, long created) Implements org. Create a new session id if necessary.
| |
| newSessionId | back to summary |
|---|---|
public String newSessionId(long seedTerm)
| |
| renewSessionId | back to summary |
|---|---|
| public String renewSessionId(String oldClusterId, String oldNodeId, Request request) Implements org. Generate a new id for a session and update across all SessionManagers.
| |
| scavenge | back to summary |
|---|---|
| public void scavenge() Implements org. | |
| setRandom | back to summary |
|---|---|
| public void setRandom(Random random) Set a random number generator for generating ids.
| |
| setReseed | back to summary |
|---|---|
| public void setReseed(long reseed) Set the reseed probability.
| |
| setServer | back to summary |
|---|---|
| public void setServer(Server server) Set the server associated with this id manager.
| |
| setSessionHouseKeeper | back to summary |
|---|---|
| public void setSessionHouseKeeper(HouseKeeper houseKeeper) Implements org. Doc from org. Set the housekeeper for doing scavenging.
| |
| setWorkerName | back to summary |
|---|---|
| public void setWorkerName(String workerName) Set the workername. If set, the workername is dot appended to the session ID and can be used to assist session affinity in a load balancer. A worker name starting with $ is used as a request attribute name to lookup the worker name that can be dynamically set by a request Customizer.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object. | |