Uses of Package
dk.cloudcreate.essentials.components.eventsourced.aggregates.decider
-
Packages that use dk.cloudcreate.essentials.components.eventsourced.aggregates.decider Package Description dk.cloudcreate.essentials.components.eventsourced.aggregates.decider -
Classes in dk.cloudcreate.essentials.components.eventsourced.aggregates.decider used by dk.cloudcreate.essentials.components.eventsourced.aggregates.decider Class Description AggregateIdResolver Interface responsible for resolve the optional aggregate id associated with the typeT
Example of usages:
Command - return the aggregate id associated with the command (can return anOptional.empty()) in case server generated id's are used for commands that create a new Aggregate instance) Event - return the aggregate id associated with the event State - return the aggregate id associated with the aggregate state event projection View - return the aggregate id associated with the View event projectionCommandHandler Command Handler which is responsible for loading any existing AggregateSTATEfrom the underlyingEventStore(seeCommandHandler.deciderBasedCommandHandler(ConfigurableEventStore, AggregateType, Class, AggregateIdResolver, AggregateIdResolver, AggregateSnapshotRepository, Class, Decider)) and coordinate persisting any changes to the Aggregate, in the form ofEVENT's, to theEventStoreas part of an activeUnitOfWork(if one exists)
The actual logic is delegated to an instance of aDeciderDecider Variant of the event sourced Decider pattern, which supports building an AggregateSTATEbased on previousEVENT's that relate to the aggregate instance, and which can handleCOMMAND's, whose side effect is either anERRORor a List ofEVENT's (can be an empty list)Handler Deciderrelated interface that is responsible for handlingCOMMAND(s),whose side effect is either anERRORor a List ofEVENT's (can be an empty list)HandlerResult Captures that result of calling aHandler.handle(Object, Object)for a specificCOMMANDand aggregateSTATE
Concrete instances can either be of typeHandlerResult.Successor typeHandlerResult.ErrorHandlerResult.Error Error variant of theHandlerResultHandlerResult.Success Success variant of theHandlerResultInitialStateProvider DeciderorViewrelated interface, which provides the InitialSTATEfor a given aggregate/projection/view.
TheInitialStateProviderworks in collaboration with theStateEvolverin the context of theDeciderorViewpatternIsStateFinalResolver Deciderrelated interface that resolves if the aggregate's state is final and no more changes can occur, i.e.StateEvolver