Package com.gigaspaces.lrmi.nio.watchdog
Class Watchdog
java.lang.Object
java.lang.Thread
com.gigaspaces.internal.utils.concurrent.GSThread
com.gigaspaces.lrmi.nio.watchdog.Watchdog
- All Implemented Interfaces:
Runnable
Watchdog for network failure detection and handling idle threads.
- Since:
- 5.0
- Version:
- 1.0
- Author:
- anna
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumGroups indicesfinal classWatchdogGroup is a group of objects that are monitored by the Watchdog.static classObject watched by the Watchdog - WatchedObject is used to watch NIO connectionsNested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Watchdog.WatchdogGroupgetGroup(Watchdog.Group group) Get WatchdogGroup and initialize singleton WatchDog daemon per JVM.voidrun()Watchdog main method.static voidshutdown()Shuts down the watchdog if operation, this is irreversable process.Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
Watchdog
public Watchdog(String name, long requestTimeout, long listeningTimeout, long idleTimeout, int timeoutResolution, boolean protocolValidationEnabled) Constructor
-
-
Method Details
-
getGroup
Get WatchdogGroup and initialize singleton WatchDog daemon per JVM. -
shutdown
public static void shutdown()Shuts down the watchdog if operation, this is irreversable process. -
run
public void run()Watchdog main method. Watchdog monitors several WatchdogGroups that have different timeout settings. Therefore its sleeping timeout is calculated each time to be the next closest running time of its groups. TODO verify that Watchdog processing time that is not taken into consideration doesn't create a large timing error
-