CommandOutcome

How the kernel finished a command; the runtime reads it, an application never does.

Inheritors

Types

Link copied to clipboard

The same command was already committed as stream: it was not decided again.

Link copied to clipboard
class Committed(val stream: EventStreamRecord, val position: LogPosition, val state: Any, val results: Map<String, Any> = emptyMap(), val deleted: Boolean = false, val schedules: Map<String, ScheduleRule> = emptyMap(), val first: FirstCommit? = null, val rejection: Rejection? = null) : CommandOutcome

The command's events are committed as stream at position; state is the state after them. results are what its decide function put for the caller (me.ahoo.wow.api.decide.DecideScope.putResult); they are not kept, so a duplicate of the command is answered without them. deleted and schedules are the metadata the kernel keeps beside the state after the stream (CachedState); its scope is the stream's.

Link copied to clipboard

Concurrent writers kept winning the version slot for attempts attempts.

Link copied to clipboard
class Rejected(val rejection: Rejection, val version: Int? = null, val duplicate: Boolean = false, val droppedEvents: Int = 0) : CommandOutcome

The command was refused and nothing was written: version is the aggregate's version the decision saw, null for a creation, whose aggregate does not exist, or a refusal before any decision. duplicate: a retry of a command whose rejection was committed with its events, answered with that rejection and the version they reached. droppedEvents: the events a creation's rejection carried, which were dropped, since its aggregate does not exist; 0 otherwise. The node warns about them, and the test DSL fails the command's specification.

Link copied to clipboard

The command was accepted and changed nothing; the aggregate stays at version.

Link copied to clipboard

Whether the command committed could not be established.