Types

Link copied to clipboard
data class Conflict(val expectedVersion: Long?, val actualVersion: Long?) : AggregateChangeResult.Failure<Nothing>
Link copied to clipboard
Link copied to clipboard
data class NotFound(val aggregateId: String) : AggregateChangeResult.Failure<Nothing>
Link copied to clipboard
data class OutcomeUnknown<EVENT>(val preparedAppend: PreparedAppend<EVENT>, val cause: Throwable) : AggregateChangeResult.Failure<EVENT>

The store may have committed the events but could not return a definitive acknowledgement. Retain preparedAppend and submit it through aggregate recovery, which retries the exact append and reloads committed state. Do not handle the command again: that would decide and prepare a new append against state that may already include the first attempt.

Link copied to clipboard
data class Rejected(val reason: String, val cause: Throwable? = null) : AggregateChangeResult.Failure<Nothing>

Functions

Link copied to clipboard

Returns committed state for either success branch, or null for every failure branch.