Granted

class Granted(val lane: Lane, val cost: Int, val waited: Duration) : BudgetEvent(source)

A call was granted after waiting waited (zero for an immediate grant).

Stable Core.

Parameters

lane

the lane the call was charged to.

cost

the units charged; at least 1.

waited

how long the call waited for its slot; not negative.

Throws

if cost is below 1 or waited is negative.

Constructors

Link copied to clipboard
constructor(lane: Lane, cost: Int, waited: Duration)

Properties

Link copied to clipboard
val cost: Int

The units charged; at least 1.

Link copied to clipboard
val lane: Lane

The lane the call was charged to.

Link copied to clipboard

How long the call waited for its slot; zero for an immediate grant.

Functions

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

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