Class Awaitable.SyncAwaitable

    • Constructor Detail

      • SyncAwaitable

        protected SyncAwaitable()
    • Method Detail

      • await

        public Awaitable await()
                        throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException - if interrupted
      • awaitUntil

        public boolean awaitUntil​(long nanoTimeDeadline)
                           throws java.lang.InterruptedException
        Returns:
        true if we were signalled, false if the deadline elapsed
        Throws:
        java.lang.InterruptedException - if interrupted
      • isSignalled

        protected abstract boolean isSignalled()
        Return true once signalled. Unidirectional; once true, must never again be false.
      • waitUntil

        public static boolean waitUntil​(java.lang.Object monitor,
                                        long deadlineNanos)
                                 throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException