Class Monitor

java.lang.Object
host.anzo.simon.Monitor
Direct Known Subclasses:
SequenceMonitor

public class Monitor extends Object
A simple monitor class whose instance can have a sequence id.
  • 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()