Interface Awaitable

    • Method Detail

      • awaitUntil

        boolean awaitUntil​(long nanoTimeDeadline)
                    throws java.lang.InterruptedException
        Await until the deadline (in nanoTime), throwing any interrupt. No spurious wakeups.
        Returns:
        true if we were signalled, false if the deadline elapsed
        Throws:
        java.lang.InterruptedException - if interrupted
      • awaitUntilThrowUncheckedOnInterrupt

        boolean awaitUntilThrowUncheckedOnInterrupt​(long nanoTimeDeadline)
                                             throws UncheckedInterruptedException
        Await until the deadline (in nanoTime), throwing any interrupt as an unchecked exception. No spurious wakeups.
        Returns:
        true if we were signalled, false if the deadline elapsed
        Throws:
        UncheckedInterruptedException - if interrupted
      • awaitUntilUninterruptibly

        boolean awaitUntilUninterruptibly​(long nanoTimeDeadline)
        Await until the deadline (in nanoTime), ignoring interrupts (but maintaining the interrupt flag on exit). No spurious wakeups.
        Returns:
        true if we were signalled, false if the deadline elapsed
      • await

        boolean await​(long time,
                      java.util.concurrent.TimeUnit units)
               throws java.lang.InterruptedException
        Await for the specified period, throwing any interrupt. No spurious wakeups.
        Returns:
        true if we were signalled, false if the timeout elapses
        Throws:
        java.lang.InterruptedException - if interrupted
      • awaitThrowUncheckedOnInterrupt

        boolean awaitThrowUncheckedOnInterrupt​(long time,
                                               java.util.concurrent.TimeUnit units)
                                        throws UncheckedInterruptedException
        Await for the specified period, throwing any interrupt as an unchecked exception. No spurious wakeups.
        Returns:
        true if we were signalled, false if the timeout elapses
        Throws:
        UncheckedInterruptedException - if interrupted
      • awaitUninterruptibly

        boolean awaitUninterruptibly​(long time,
                                     java.util.concurrent.TimeUnit units)
        Await until the deadline (in nanoTime), ignoring interrupts (but maintaining the interrupt flag on exit). No spurious wakeups.
        Returns:
        true if we were signalled, false if the timeout elapses
      • await

        Awaitable await()
                 throws java.lang.InterruptedException
        Await indefinitely, throwing any interrupt. No spurious wakeups.
        Throws:
        java.lang.InterruptedException - if interrupted
      • awaitUninterruptibly

        Awaitable awaitUninterruptibly()
        Await indefinitely, ignoring interrupts (but maintaining the interrupt flag on exit). No spurious wakeups.