public class SessionWatchdogContext
extends java.lang.Object
| Constructor and Description |
|---|
SessionWatchdogContext(TimingProvider timingProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToSplitByTimeout(SessionProxyImpl sessionProxy)
Adds the given session proxy so that it will be automatically split the underlying session when the idle timeout
or the max session time is reached.
|
void |
closeOrEnqueueForClosing(SessionImpl session,
long closeGracePeriodInMillis)
Tries to close the given session.
|
void |
dequeueFromClosing(SessionImpl session)
Removes the given session from auto-closing after a certain grace period.
|
void |
execute() |
boolean |
isShutdownRequested()
indicates whether shutdown was requested before or not.
|
void |
removeFromSplitByTimeout(SessionProxyImpl sessionProxy)
Removes the given session proxy from automatically splitting it after idle or session max time expired.
|
void |
requestShutdown()
Requests shutdown
|
public SessionWatchdogContext(TimingProvider timingProvider)
public void execute()
public void requestShutdown()
public boolean isShutdownRequested()
public void closeOrEnqueueForClosing(SessionImpl session, long closeGracePeriodInMillis)
session - the session to be closed or enqueuedcloseGracePeriodInMillis - the grace period after which the session is closed for good.public void dequeueFromClosing(SessionImpl session)
session - the session to be removed.public void addToSplitByTimeout(SessionProxyImpl sessionProxy)
sessionProxy - the session proxy to be added.public void removeFromSplitByTimeout(SessionProxyImpl sessionProxy)
sessionProxy - the session proxy to be removed.