Package org.drip.graph.concurrency
Class InterruptibleDaemonMaster
java.lang.Object
org.drip.graph.concurrency.InterruptibleDaemonMaster
public class InterruptibleDaemonMaster
extends java.lang.Object
InterruptibleDaemonMaster controls a Gracefully Interruptible Daemon.
- Module = Computational Core Module
- Library = Graph Algorithm Library
- Project = Graph Optimization and Tree Construction Algorithms
- Package = Helper Classes For Concurrent Tasks
- 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 TimeoutInterruptibleDaemon
interruptibleDaemon()
Retrieve the Interruptible Daemon Taskboolean
monitor()
Run the Daemon Monitorlong
softTimeout()
Retrieve the Soft TimeoutMethods 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.ExceptionInterruptibleDaemonMaster Constructor- Parameters:
interruptibleDaemon
- Interruptible Daemon TasksoftTimeout
- Soft TimeouthardTimeout
- Hard Timeout- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
-
Method Details
-
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.InterruptedExceptionRun the Daemon Monitor- Returns:
- TRUE - The Daemon successfully completed
- Throws:
java.lang.InterruptedException
- Thrown if the Underlying Thread Calls are Interrupted
-