Class EventSourcingOrchestratingLockingAggregate<C, S, E, V>

Event sourcing orchestrating locking aggregate is using/delegating a EventSourcingOrchestratingLockingAggregate.decider of type IDecider<C, S, E> to handle commands and produce events. In order to handle the command, aggregate needs to fetch the current state (represented as a list of events) via EventLockingRepository.fetchEvents function, and then delegate the command to the EventSourcingOrchestratingLockingAggregate.decider which can produce new event(s) as a result.

If the EventSourcingOrchestratingLockingAggregate.decider is combined out of many deciders via combine function, an optional EventSourcingOrchestratingLockingAggregate.saga could be used to react on new events and send new commands to the EventSourcingOrchestratingLockingAggregate.decider recursively, in one transaction.

Produced events are then stored via EventLockingRepository.save function.

Author

Иван Дугалић / Ivan Dugalic /

Idugalic

Type Parameters

  • C

    Commands of type C that this aggregate can handle

  • S

    Aggregate state of type S

  • E

    Events of type E that this aggregate can publish

  • V

    Version

Hierarchy

Implements

Constructors

Properties

decider: IDecider<C, S, E>
eventRepository: EventLockingRepository<C, E, V>
initialState: S
saga: ISaga<E, C>

Methods

Generated using TypeDoc