Package com.dynatrace.openkit.core
Class SessionWatchdogContext
- java.lang.Object
-
- com.dynatrace.openkit.core.SessionWatchdogContext
-
public class SessionWatchdogContext extends java.lang.ObjectA context keeping track of sessions which could not be finished after session splitting by events and which will be closed after a grace period.
-
-
Constructor Summary
Constructors Constructor Description SessionWatchdogContext(TimingProvider timingProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToSplitByTimeout(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.voidcloseOrEnqueueForClosing(SessionImpl session, long closeGracePeriodInMillis)Tries to close the given session.voiddequeueFromClosing(SessionImpl session)Removes the given session from auto-closing after a certain grace period.voidexecute()booleanisShutdownRequested()indicates whether shutdown was requested before or not.voidremoveFromSplitByTimeout(SessionProxyImpl sessionProxy)Removes the given session proxy from automatically splitting it after idle or session max time expired.voidrequestShutdown()Requests shutdown
-
-
-
Constructor Detail
-
SessionWatchdogContext
public SessionWatchdogContext(TimingProvider timingProvider)
-
-
Method Detail
-
execute
public void execute()
-
requestShutdown
public void requestShutdown()
Requests shutdown
-
isShutdownRequested
public boolean isShutdownRequested()
indicates whether shutdown was requested before or not.
-
closeOrEnqueueForClosing
public void closeOrEnqueueForClosing(SessionImpl session, long closeGracePeriodInMillis)
Tries to close the given session. If closing the session is currently not possible (e.g. due to still ongoing child actions / web request tracers) it will be enqueued to be forcefully closed after the given grade period is expired.- Parameters:
session- the session to be closed or enqueuedcloseGracePeriodInMillis- the grace period after which the session is closed for good.
-
dequeueFromClosing
public void dequeueFromClosing(SessionImpl session)
Removes the given session from auto-closing after a certain grace period.- Parameters:
session- the session to be removed.
-
addToSplitByTimeout
public 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.- Parameters:
sessionProxy- the session proxy to be added.
-
removeFromSplitByTimeout
public void removeFromSplitByTimeout(SessionProxyImpl sessionProxy)
Removes the given session proxy from automatically splitting it after idle or session max time expired.- Parameters:
sessionProxy- the session proxy to be removed.
-
-