WaitContext

class WaitContext @InternalWowApi constructor(val waitId: String, val origin: Origin, val remaining: List<Hop>, val deadline: Long)

What travels with a command's messages and its log entry while its caller waits beyond COMMITTED: transport metadata, never a fact, invisible to domain code.

  • waitId identifies the wait on its origin.

  • remaining are the hops not reached yet. On a log entry they start after COMMITTED, so the first one, a HANDLED hop, names the subscription that signals once it has handled the entry.

  • deadline is when the wait gives up, in epoch milliseconds; past it no one signals.

Fields may be added: construct one with of; the constructor is internal to Wow.

Constructors

Link copied to clipboard
constructor(waitId: String, origin: Origin, remaining: List<Hop>, deadline: Long)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

The HANDLED hop an entry carrying this context waits for next, if any.

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

Functions

Link copied to clipboard

This context once its command is committed: without the leading ACCEPTED and COMMITTED hops.

Link copied to clipboard
fun copyWith(waitId: String = this.waitId, origin: Origin = this.origin, remaining: List<Hop> = this.remaining, deadline: Long = this.deadline): WaitContext

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

Link copied to clipboard

This context for the commands a saga derives at the hop remaining starts with: the hops after it, or null when there are none (the chain ends at the saga).

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

Whether the wait is over at now.

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

This context on the wire, as Wow-Call and the cluster channel carry it.