Refused

class Refused(val lane: Lane, val cost: Int, val wait: Duration, val reason: ExhaustedReason, val window: String?) : BudgetEvent(source)

A call was refused (or a waiter failed after a re-plan): wait is what it would have waited, Duration.INFINITE for CostExceedsLimit.

Stable Core.

Parameters

lane

the lane the call asked for.

cost

the units it asked for; at least 1.

wait

the wait it would have had; not negative.

reason

why it was refused.

window

the window that set the wait, or null; not blank when present.

Throws

if cost is below 1, wait is negative or window is blank.

Constructors

Link copied to clipboard
constructor(lane: Lane, cost: Int, wait: Duration, reason: ExhaustedReason, window: String?)

Properties

Link copied to clipboard
val cost: Int

The units it asked for; at least 1.

Link copied to clipboard
val lane: Lane

The lane the call asked for.

Link copied to clipboard

Why it was refused.

Link copied to clipboard

The wait it would have had; Duration.INFINITE for CostExceedsLimit.

Link copied to clipboard

The window that set the wait, or null.

Functions

Link copied to clipboard
open override fun toString(): String

A diagnostic string for logs: the lane's name, cost, wait, the reason's name and window. Its format is not part of the API and may change.