类 ForwardingTimeout

java.lang.Object
com.lark.oapi.okio.Timeout
com.lark.oapi.okio.ForwardingTimeout

public class ForwardingTimeout extends Timeout
A Timeout which forwards calls to another. Useful for subclassing.
  • 构造器详细资料

    • ForwardingTimeout

      public ForwardingTimeout(Timeout delegate)
  • 方法详细资料

    • delegate

      public final Timeout delegate()
      Timeout instance to which this instance is currently delegating.
    • setDelegate

      public final ForwardingTimeout setDelegate(Timeout delegate)
    • timeout

      public Timeout timeout(long timeout, TimeUnit unit)
      从类复制的说明: Timeout
      Wait at most timeout time before aborting an operation. Using a per-operation timeout means that as long as forward progress is being made, no sequence of operations will fail.

      If timeout == 0, operations will run indefinitely. (Operating system timeouts may still apply.)

      覆盖:
      timeout 在类中 Timeout
    • timeoutNanos

      public long timeoutNanos()
      从类复制的说明: Timeout
      Returns the timeout in nanoseconds, or 0 for no timeout.
      覆盖:
      timeoutNanos 在类中 Timeout
    • hasDeadline

      public boolean hasDeadline()
      从类复制的说明: Timeout
      Returns true if a deadline is enabled.
      覆盖:
      hasDeadline 在类中 Timeout
    • deadlineNanoTime

      public long deadlineNanoTime()
      从类复制的说明: Timeout
      Returns the nano time when the deadline will be reached.
      覆盖:
      deadlineNanoTime 在类中 Timeout
    • deadlineNanoTime

      public Timeout deadlineNanoTime(long deadlineNanoTime)
      从类复制的说明: Timeout
      Sets the nano time when the deadline will be reached. All operations must complete before this time. Use a deadline to set a maximum bound on the time spent on a sequence of operations.
      覆盖:
      deadlineNanoTime 在类中 Timeout
    • clearTimeout

      public Timeout clearTimeout()
      从类复制的说明: Timeout
      Clears the timeout. Operating system timeouts may still apply.
      覆盖:
      clearTimeout 在类中 Timeout
    • clearDeadline

      public Timeout clearDeadline()
      从类复制的说明: Timeout
      Clears the deadline.
      覆盖:
      clearDeadline 在类中 Timeout
    • throwIfReached

      public void throwIfReached() throws IOException
      从类复制的说明: Timeout
      Throws an InterruptedIOException if the deadline has been reached or if the current thread has been interrupted. This method doesn't detect timeouts; that should be implemented to asynchronously abort an in-progress operation.
      覆盖:
      throwIfReached 在类中 Timeout
      抛出:
      IOException