ObservedEvent

sealed class ObservedEvent

Something the core noticed that has no duration of its own, told to Observer.observed: a refusal, a dropped signal, a partition paused. An observer counts it, logs it or ignores it; the core goes on either way. The core builds each, so their constructors are internal to Wow; an observer matches on the type (when (event)) and reads the fields.

Cases may be added in a minor release, so a when over it keeps an else branch.

A field from a closed set is an enum whose value is its name in metrics and logs (queue-full); a field that is open stays text, and its KDoc says why: an error code (an open vocabulary), a node's address, a failure's description.

Inheritors

Types

Link copied to clipboard
class AccessStamped @InternalWowApi constructor(val type: AggregateType, val cause: ObservedEvent.AccessStamped.Cause, val streams: Int, val millis: Long) : ObservedEvent

streams streams of type's history stamped with their aggregate's current access attributes, in millis, for cause: a commit that changed them, the walk of the type, or a stream the follower found without them.

Link copied to clipboard
class AccessWalked @InternalWowApi constructor(val type: AggregateType, val aggregates: Int, val completed: Boolean) : ObservedEvent

A page of aggregates aggregates of type walked, after which the walk is completed or not.

Link copied to clipboard
class Backpressured @InternalWowApi constructor(val group: String, val subscription: String, val partition: Int, val code: String) : ObservedEvent

subscription of the subscription group retries an entry in partition whose downstream pushed back with code (wow.command.busy, wow.wait.timeout, wow.query.busy, or the failure's class): text, as error codes are an open vocabulary.

Link copied to clipboard
class Fatal @InternalWowApi constructor(val component: ObservedEvent.Fatal.Component, val name: String, val error: String) : ObservedEvent

A fatal error of the virtual machine (an OutOfMemoryError, an InternalError, an UnknownError; a StackOverflowError is a failure of the work that met it, not this) that the node's component met in its work on name: the subscription with its group, the context, the lease group. The node is fatal from then on, its liveness DOWN until the process ends. name is text, the application's names; error is the error's class, its full name.

Link copied to clipboard

A forward of a command of type to its partition's owner that did not get the owner's settlement.

Link copied to clipboard

The background work on type's histories skipped one of its aggregates and went on with the others: the aggregate's history did not replay, or a read or write of it failed in a way no retry changes. The aggregate is parked in the failure ledger for an operator to retry or skip; this is told once per parking.

Link copied to clipboard
class OffsetGap @InternalWowApi constructor(val topic: String, val partition: Int) : ObservedEvent

A read of partition of topic was to start from an offset the partition no longer holds (the topic's retention deleted it, or the topic was created again): messages were lost to its subscriptions, an error to alert on whatever the transport did about it.

Link copied to clipboard
class OwnershipFenced @InternalWowApi constructor(val group: String, val stalledMillis: Long) : ObservedEvent

This node fenced the lease group (service/context, text: a service's own names): its reconcile finished no step for one partition for stalledMillis, so the node left the group's members and gives up its leases, each once its partition's commands in flight end, for the other members to take (OwnershipRecovered).

Link copied to clipboard
class OwnershipRecovered @InternalWowApi constructor(val group: String, val fencedMillis: Long) : ObservedEvent

This node's reconcile of the lease group finished a step again after fencedMillis fenced (OwnershipFenced): the node is one of the group's members again, and takes its share of the partitions back.

Link copied to clipboard
class PartitionPaused @InternalWowApi constructor(val group: String, val subscription: String, val partition: Int, val reason: String) : ObservedEvent

subscription of the subscription group paused partition on a systemic failure, reason describing it (the failure's own words, so text): it handles nothing there but one probe at a time, spending no aggregate's retries and parking none, until a handling succeeds (PartitionResumed).

Link copied to clipboard
class PartitionResumed @InternalWowApi constructor(val group: String, val subscription: String, val partition: Int, val pausedMillis: Long) : ObservedEvent

subscription of the subscription group resumed partition, paused for pausedMillis (PartitionPaused).

Link copied to clipboard
class PartitionThrottled @InternalWowApi constructor(val group: String, val subscription: String, val partition: Int, val throttled: Boolean) : ObservedEvent

subscription of the subscription group started throttling partition on backpressure (throttled true), running fewer handlings at once, or stopped, back at its in-flight bound (throttled false).

Link copied to clipboard
class PeerBypassed @InternalWowApi constructor(val context: String, val target: String) : ObservedEvent

A client of this node sent a request to target, a node of context's peer service (its base URL, text: an address), and the node took it and did not answer it within the request's bound: the requests to context that follow go to its other nodes, until it answers a request, the peer list is read again or it lapses (PeerRestored). No probe is sent, and the unanswered request is not sent again.

Link copied to clipboard
class PeerRestored @InternalWowApi constructor(val context: String, val target: String, val bypassedMillis: Long, val reason: ObservedEvent.PeerRestored.Reason) : ObservedEvent

target, a node of context's peer service bypassed for bypassedMillis (PeerBypassed), is back in the rotation, or gone from it, as reason says.

Link copied to clipboard
class Refused @InternalWowApi constructor(val type: AggregateType, val code: String) : ObservedEvent

A command of type that ended before the kernel took it, with the framework or authorization code it was answered with: an admission refusal, a busy lane or node (wow.command.busy), a closing node, an unavailable store, a wait that timed out while it queued. code is text: error codes are an open vocabulary, an application's authorizer's among them.

Link copied to clipboard
class Rejected @InternalWowApi constructor(val type: AggregateType, val commandType: String, val code: String, val withEvents: Boolean) : ObservedEvent

A command of commandType on type that the aggregate's decision rejected with code, an outcome of the business rather than a failure. withEvents is whether the rejection carried events; a committed rejection's events are also observed as any commit's. code is text: rejection codes are the application's vocabulary.

Link copied to clipboard
class ReservationLost @InternalWowApi constructor(val context: String) : ObservedEvent

A committed fact of context that lost a key it reserved: another owner took the key after the fact's pending reservation expired, so confirming it could not get it back. Logged as an error too; a count to alert on, since the fact now breaks the uniqueness it reserved for.

Link copied to clipboard
class RouteLookedUp @InternalWowApi constructor(val type: AggregateType, val outcome: ObservedEvent.RouteLookedUp.Outcome, val read: Boolean) : ObservedEvent

A command of type whose route named no owner, after this node read its lease group's routes once more before running it without the lease (outcome); read is whether this command made that read, rather than take one made a moment before by another command.

Link copied to clipboard

A wait signal for the node origin (its address, so text) that was dropped without being sent, for reason.

Link copied to clipboard
class StateCache @InternalWowApi constructor(val context: String, val outcome: ObservedEvent.StateCache.Outcome) : ObservedEvent

A lookup of an aggregate's state in the state cache of context by the kernel, a state evicted from it, or one dropped as stale.

Link copied to clipboard
class StateRebuilt @InternalWowApi constructor(val type: AggregateType, val gated: Boolean, val outcome: ObservedEvent.StateRebuilt.Outcome, val waitMillis: Long) : ObservedEvent

A subscription's rebuild of a shared state of type, once the context's views no longer held it: from the snapshot store and the log. gated when its replay was longer than one page of the log and ran under the node's replay gate, which held it waitMillis for a permit (0 when it was not gated). outcome says whether it ran or the gate refused it, a busy store, which the subscription retries as backpressure.

Link copied to clipboard

A store of context fell back from an optional capability for reason; the work went on the way every store can. Counted, never failing.

Link copied to clipboard
class TailRead @InternalWowApi constructor(val context: String, val partition: Int, val reason: ObservedEvent.TailRead.Reason) : ObservedEvent

A tail of partition of context's log read the store: the node hands its own commits to its tails in memory, so a tail reads the store only when memory cannot continue it, for reason.

Link copied to clipboard
class Undecodable @InternalWowApi constructor(val topic: String, val partition: Int, val offset: Long, val parked: Boolean) : ObservedEvent

A message at offset of partition of topic this version cannot decode: parked when its key names an aggregate, whose subscriptions park it there; otherwise passed over, the checkpoint moving past it.

Link copied to clipboard
class WaitTimedOut @InternalWowApi constructor(val type: AggregateType, val stage: Stage) : ObservedEvent

A wait on a command of type that timed out (wow.wait.timeout), at the stage it had reached last.

Functions

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