WaitOptions

class WaitOptions @InternalWowApi constructor(val maxTimeout: Duration = DEFAULT_MAX_TIMEOUT, val maxHops: Int = DEFAULT_MAX_HOPS, val defaultTimeout: Duration = WaitPlan.DEFAULT_TIMEOUT, val unknownContexts: UnknownContexts = UnknownContexts.ALLOW, val maxRegistered: Int = DEFAULT_MAX_REGISTERED)

The tuning of waits on one node; the node itself, as signals address it, is its WaitCoordinator's origin.

  • maxTimeout caps the timeout a caller asks for.

  • maxHops is the longest chain a wait may follow: DEFAULT_MAX_HOPS by default, at most MAX_HOPS_CAP. Each saga a chain follows adds two hops, its handled and the next committed.

  • unknownContexts is what a chain may name of a context this node knows no Manifest of.

  • defaultTimeout is the timeout of a command whose caller names no wait plan, at most maxTimeout: a default above it is refused, since it would act as the maximum without a word. me.ahoo.wow.runtime.admission.CommandGateway applies it to every entry.

  • maxRegistered is how many waits the node holds at once: DEFAULT_MAX_REGISTERED by default. A command whose wait would be one more is not run: it is answered FAILED at ACCEPTED with ResultCodes.BUSY (wow.command.busy, 429 with Retry-After), as a command beyond the node's in-flight limit is, so a retry with the same request id is safe. A plan answered at ACCEPTED registers no wait and is never refused so. The same number bounds, apart from the waits, the sends to a command topic that outlived their waits (WaitRegistry.sendsLeft): beyond it, a command for a command topic is refused so, whatever its plan.

Fields may be added: Wow builds it from the host's configuration, so the constructor is internal to Wow.

Constructors

Link copied to clipboard
constructor(maxTimeout: Duration = DEFAULT_MAX_TIMEOUT, maxHops: Int = DEFAULT_MAX_HOPS, defaultTimeout: Duration = WaitPlan.DEFAULT_TIMEOUT, unknownContexts: UnknownContexts = UnknownContexts.ALLOW, maxRegistered: Int = DEFAULT_MAX_REGISTERED)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copyWith(maxTimeout: Duration = this.maxTimeout, maxHops: Int = this.maxHops, defaultTimeout: Duration = this.defaultTimeout, unknownContexts: UnknownContexts = this.unknownContexts, maxRegistered: Int = this.maxRegistered): WaitOptions

This WaitOptions with the given fields replaced: Wow's own copy, left out of the ABI.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String