StateStoredLockingOrchestratingAggregate<C, S, E, V, CM, SM> class abstract interface

Handles orchestrated commands with optimistic state locking.

Uses or delegates to a Decider, a Saga, and a StateLockingRepository to handle commands and produce a new state 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
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

computeNewState(S? state, C command) Future<S>
Computes new state for command from the current state.
inherited
fetchState(C command) Future<(S?, V?)>
Returns the state associated with command and its current version.
inherited
fetchStateWithMetadata(C command) Future<(S?, V?, SM)>
Returns the state, current version, and metadata for command.
inherited
handleOptimistically(C command) Future<(S, V)>
Handles command with optimistic locking.
handleOptimisticallyWithMetadata(C command, CM metadata) Future<(S, V, SM)>
Handles command with metadata and optimistic locking.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save(S state, V? currentStateVersion) Future<(S, V)>
Persists state if currentStateVersion still matches storage.
inherited
saveWithMetadata(S state, V? currentStateVersion, CM metadata) Future<(S, V, SM)>
Persists state with metadata if the version still matches storage.
inherited
toString() String
A string representation of this object.
inherited

Operators

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