Skip to content

okio / okio / ForwardingTimeout

ForwardingTimeout

(jvm) open class ForwardingTimeout :Timeout

A Timeout which forwards calls to another. Useful for subclassing.

Constructors

Name Summary
(jvm) <init> A Timeout which forwards calls to another. Useful for subclassing.ForwardingTimeout(delegate:Timeout)

Properties

Name Summary
(jvm) delegate var delegate:Timeout

Functions

Name Summary
(jvm) clearDeadline Clears the deadline.open fun clearDeadline():Timeout
(jvm) clearTimeout Clears the timeout. Operating system timeouts may still apply.open fun clearTimeout():Timeout
(jvm) deadlineNanoTime Returns the nano time when the deadline will be reached.open fun deadlineNanoTime():Long
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.open fun deadlineNanoTime(deadlineNanoTime:Long):Timeout
(jvm) hasDeadline Returns true if a deadline is enabled.open fun hasDeadline():Boolean
(jvm) setDelegate fun setDelegate(delegate:Timeout):ForwardingTimeout
(jvm) throwIfReached 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.open fun throwIfReached():Unit
(jvm) 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.open fun timeout(timeout:Long, unit:TimeUnit):Timeout
(jvm) timeoutNanos Returns the timeout in nanoseconds, or 0 for no timeout.open fun timeoutNanos():Long

Inherited Functions

Name Summary
(jvm) deadline Set a deadline of now plus duration time.fun deadline(duration:Long, unit:TimeUnit):Timeout
(jvm) intersectWith Applies the minimum intersection between this timeout and other, run block, then finally rollback this timeout’s values.fun intersectWith(other:Timeout, block: () ->Unit):Unit
(jvm) waitUntilNotified Waits on monitor until it is notified. Throws InterruptedIOException if either the thread is interrupted or if this timeout elapses before monitor is notified. The caller must be synchronized on monitor.fun waitUntilNotified(monitor:Any):Unit