EventSourcingLockingOrchestratingAggregate<C, S, E, V, CM, EM> class abstract interface

Handles orchestrated commands with optimistic event-stream locking.

Uses or delegates to a Decider, a Saga, and an EventLockingRepository to handle commands and produce events with optimistic locking.

Implemented types

Properties

decide Decide<C, S, E>
Computes new events for command in the current state.
no setterinherited
evolve Evolve<S, E>
Applies an event to a state and returns the next state.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
initialState → S
State used when no prior state exists.
no setterinherited
latestVersionProvider LatestVersionProvider<E, V>
The latest event stream version provider.
no setterinherited
react React<E, C>
Emits follow-up actions for an action result.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

computeNewEvents(Stream<E> events, C command) Stream<E>
Computes new events for command from the current events stream.
inherited
computeNewEventsByOrchestrating(Stream<E> events, C command, Stream<E> fetchEvents(C command)) Stream<E>
Computes new events for command from the current events stream, recursively orchestrating follow-up commands via react.
inherited
fetchEvents(C command) Stream<(E, V)>
Returns the event stream associated with command, paired with versions.
inherited
fetchEventsWithMetadata(C command) Stream<(E, V, EM)>
Returns the event stream associated with command, paired with versions and metadata.
inherited
handleOptimistically(C command) Stream<(E, V)>
Handles command by fetching current events, computing new events, and saving them optimistically.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save(Stream<E> events, LatestVersionProvider<E, V> latestVersionProvider) Stream<(E, V)>
Persists events using latestVersionProvider and returns the newly saved event stream paired with versions.
inherited
saveAtVersion(Stream<E> events, V? latestVersion) Stream<(E, V)>
Persists events using the explicit latestVersion and returns the newly saved event stream paired with versions.
inherited
saveAtVersionWithMetadata(Stream<E> events, V? latestVersion, CM metadata) Stream<(E, V, EM)>
Persists events using the explicit latestVersion and returns the newly saved event stream paired with versions and metadata.
inherited
saveWithMetadata(Stream<E> events, LatestVersionProvider<E, V> latestVersionProvider, CM metadata) Stream<(E, V, EM)>
Persists events using latestVersionProvider and returns the newly saved event stream paired with versions and metadata.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited