Class EventLock


  • public class EventLock
    extends Object
    • Constructor Detail

      • EventLock

        public EventLock()
    • Method Detail

      • doWait

        public boolean doWait()
                       throws InterruptedException
        Wait indefinitely for set() to be called.
        Returns:
        True if set() was called, false woken unexpectedly.
        Throws:
        InterruptedException - If interrupted.
      • doWait

        public boolean doWait​(int timeout)
                       throws InterruptedException
        Wait the specified time period for set() to be called.
        Parameters:
        timeout - Timeout value in milliseconds.
        Returns:
        True if set() was called, false if timed out waiting.
        Throws:
        InterruptedException - If interrupted.
      • set

        public void set()
      • clear

        public void clear()