Class Watchdog

All Implemented Interfaces:
Runnable

public class Watchdog extends GSThread
Watchdog for network failure detection and handling idle threads.
Since:
5.0
Version:
1.0
Author:
anna
  • Constructor Details

    • Watchdog

      public Watchdog(String name, long requestTimeout, long listeningTimeout, long idleTimeout, int timeoutResolution, boolean protocolValidationEnabled)
      Constructor
  • Method Details

    • getGroup

      public static Watchdog.WatchdogGroup getGroup(Watchdog.Group group)
      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
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread