Class InterruptibleDaemonMaster

java.lang.Object
org.drip.graph.concurrency.InterruptibleDaemonMaster

public class InterruptibleDaemonMaster
extends java.lang.Object
InterruptibleDaemonMaster controls a Gracefully Interruptible Daemon.



Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    InterruptibleDaemonMaster​(InterruptibleDaemon interruptibleDaemon, long softTimeout, long hardTimeout)
    InterruptibleDaemonMaster Constructor
  • Method Summary

    Modifier and Type Method Description
    long hardTimeout()
    Retrieve the Hard Timeout
    InterruptibleDaemon interruptibleDaemon()
    Retrieve the Interruptible Daemon Task
    boolean monitor()
    Run the Daemon Monitor
    long softTimeout()
    Retrieve the Soft Timeout

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • InterruptibleDaemonMaster

      public InterruptibleDaemonMaster​(InterruptibleDaemon interruptibleDaemon, long softTimeout, long hardTimeout) throws java.lang.Exception
      InterruptibleDaemonMaster Constructor
      Parameters:
      interruptibleDaemon - Interruptible Daemon Task
      softTimeout - Soft Timeout
      hardTimeout - Hard Timeout
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • interruptibleDaemon

      public InterruptibleDaemon interruptibleDaemon()
      Retrieve the Interruptible Daemon Task
      Returns:
      The Interruptible Daemon Task
    • softTimeout

      public long softTimeout()
      Retrieve the Soft Timeout
      Returns:
      The Soft Timeout
    • hardTimeout

      public long hardTimeout()
      Retrieve the Hard Timeout
      Returns:
      The Hard Timeout
    • monitor

      public boolean monitor() throws java.lang.InterruptedException
      Run the Daemon Monitor
      Returns:
      TRUE - The Daemon successfully completed
      Throws:
      java.lang.InterruptedException - Thrown if the Underlying Thread Calls are Interrupted