Package 

Class ForwardingTimeout

    • Constructor Detail

      • ForwardingTimeout

        ForwardingTimeout(Timeout delegate)
    • Method Detail

      • timeout

         Timeout timeout(long timeout, TimeUnit unit)

        Wait at most {@code timeout} time before aborting an operation. Using aper-operation timeout means that as long as forward progress is being made,no sequence of operations will fail.

        If {@code timeout == 0}, operations will run indefinitely. (Operatingsystem timeouts may still apply.)

      • timeoutNanos

         long timeoutNanos()

        Returns the timeout in nanoseconds, or {@code 0} for no timeout.

      • hasDeadline

         boolean hasDeadline()

        Returns true if a deadline is enabled.

      • deadlineNanoTime

         Timeout deadlineNanoTime(long deadlineNanoTime)

        Sets the nano time when the deadline will bereached. All operations must complete before this time. Use a deadline toset a maximum bound on the time spent on a sequence of operations.

      • clearTimeout

         Timeout clearTimeout()

        Clears the timeout. Operating system timeouts may still apply.

      • throwIfReached

         void throwIfReached()

        Throws an InterruptedIOException if the deadline has been reached or if the currentthread has been interrupted. This method doesn't detect timeouts; that should be implemented toasynchronously abort an in-progress operation.