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
-
- StateOrchestratingComputation<
C, S, E> - StateLockingRepository<
C, S, V, CM, SM>
- StateOrchestratingComputation<
Properties
-
decide
→ Decide<
C, S, E> -
Computes new events for
commandin 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
commandfrom the currentstate.inherited -
fetchState(
C command) → Future< (S?, V?)> -
Returns the state associated with
commandand 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
commandwith optimistic locking. -
handleOptimisticallyWithMetadata(
C command, CM metadata) → Future< (S, V, SM)> -
Handles
commandwithmetadataand 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
stateifcurrentStateVersionstill matches storage.inherited -
saveWithMetadata(
S state, V? currentStateVersion, CM metadata) → Future< (S, V, SM)> -
Persists
statewithmetadataif the version still matches storage.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited