ForwardingTimeout

open class ForwardingTimeout(delegate: Timeout) : Timeout

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

Constructors

ForwardingTimeout
Link copied to clipboard
fun ForwardingTimeout(delegate: Timeout)

Functions

clearDeadline
Link copied to clipboard
open override fun clearDeadline(): Timeout
Clears the deadline.
clearTimeout
Link copied to clipboard
open override fun clearTimeout(): Timeout
Clears the timeout.
deadline
Link copied to clipboard
fun deadline(duration: Long, unit: TimeUnit): Timeout
Set a deadline of now plus duration time.
deadlineNanoTime
Link copied to clipboard
open override fun deadlineNanoTime(): Long
Returns the nano time when the deadline will be reached.
open override fun deadlineNanoTime(deadlineNanoTime: Long): Timeout
Sets the nano time when the deadline will be reached.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hasDeadline
Link copied to clipboard
open override fun hasDeadline(): Boolean
Returns true if a deadline is enabled.
hashCode
Link copied to clipboard
open fun hashCode(): Int
intersectWith
Link copied to clipboard
inline fun intersectWith(other: Timeout, block: () -> Unit)
Applies the minimum intersection between this timeout and other, run block, then finally rollback this timeout's values.
setDelegate
Link copied to clipboard
fun setDelegate(delegate: Timeout): ForwardingTimeout
throwIfReached
Link copied to clipboard
open override fun throwIfReached()
Throws an InterruptedIOException if the deadline has been reached or if the current thread has been interrupted.
timeout
Link copied to clipboard
open override fun timeout(timeout: Long, unit: TimeUnit): Timeout
Wait at most timeout time before aborting an operation.
timeoutNanos
Link copied to clipboard
open override fun timeoutNanos(): Long
Returns the timeout in nanoseconds, or 0 for no timeout.
toString
Link copied to clipboard
open fun toString(): String
waitUntilNotified
Link copied to clipboard
fun waitUntilNotified(monitor: Any)
Waits on monitor until it is notified.

Properties

delegate
Link copied to clipboard
var delegate: Timeout