Package host.anzo.simon
Class Monitor
java.lang.Object
host.anzo.simon.Monitor
- Direct Known Subclasses:
SequenceMonitor
A simple monitor class whose instance can have a sequence id.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidreset()voidsignal()Provide the signalbooleanwaitForSignal(long timeout) Waits for a signal.
-
Constructor Details
-
Monitor
protected Monitor()Creates a monitor object
-
-
Method Details
-
waitForSignal
public boolean waitForSignal(long timeout) Waits for a signal. if it becomes available within the given waiting time, true will be returned. Otherwise you will get false- Parameters:
timeout- timeout for signal to receive- Returns:
- true, if signal received, false if not
-
signal
public void signal()Provide the signal -
reset
public void reset()
-