Readonly
decideReadonly
evolveReadonly
fetchFetch state, version and metadata
current State/[S], Version/[V] and State Metadata/[SM]
Readonly
handleReadonly
initialReadonly
reactReadonly
saveSave state (with optimistic locking)
You can update/save the item/state, but only if the version
number in the storage has not changed.
newly saved State of type S & V & SM
Generated using TypeDoc
State stored and orchestrating aggregate interface is using/delegating a
decider
of typeIDecider
<C
,S
,E
> to handle commands and produce new state. In order to handle the command, aggregate needs to fetch the current state viaIStateRepository.fetchState
function first, and then delegate the command to thedecider
which can produce new state as a result. If thedecider
is combined out of many deciders viacombine
function, an optionalsaga
could be used to react on new events and send new commands to thedecider
recursively, in one transaction.New state is then stored via
IStateRepository.save
function.Author
Иван Дугалић / Ivan Dugalic /
Idugalic