Uses of Package
dk.cloudcreate.essentials.components.eventsourced.aggregates.decider
Packages that use dk.cloudcreate.essentials.components.eventsourced.aggregates.decider
-
Classes in dk.cloudcreate.essentials.components.eventsourced.aggregates.decider used by dk.cloudcreate.essentials.components.eventsourced.aggregates.deciderClassDescriptionInterface responsible for resolve the optional aggregate id associated with the type
T
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 projectionCommand 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 aDeciderVariant 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)Deciderrelated interface that is responsible for handlingCOMMAND(s),whose side effect is either anERRORor a List ofEVENT's (can be an empty list)Captures that result of calling aHandler.handle(Object, Object)for a specificCOMMANDand aggregateSTATE
Concrete instances can either be of typeHandlerResult.Successor typeHandlerResult.ErrorError variant of theHandlerResultSuccess variant of theHandlerResultDeciderorViewrelated interface, which provides the InitialSTATEfor a given aggregate/projection/view.
TheInitialStateProviderworks in collaboration with theStateEvolverin the context of theDeciderorViewpatternDeciderrelated interface that resolves if the aggregate's state is final and no more changes can occur, i.e.