Interface ReactorAggregateStore<S extends fr.maif.eventsourcing.State<S>,Id,TxCtx>

All Known Implementing Classes:
DefaultReactorAggregateStore

public interface ReactorAggregateStore<S extends fr.maif.eventsourcing.State<S>,Id,TxCtx>
  • Method Summary

    Modifier and Type
    Method
    Description
    default <E extends fr.maif.eventsourcing.Event>
    reactor.core.publisher.Mono<io.vavr.control.Option<S>>
    buildAggregateAndStoreSnapshot(TxCtx ctx, fr.maif.eventsourcing.EventHandler<S,E> eventHandler, io.vavr.control.Option<S> state, Id id, io.vavr.collection.List<E> events, io.vavr.control.Option<Long> lastSequenceNum)
     
    static <S extends fr.maif.eventsourcing.State<S>, Id, TxCtx>
    ReactorAggregateStore<S,Id,TxCtx>
    fromAggregateStore(fr.maif.eventsourcing.AggregateStore<S,Id,TxCtx> aggregateStore)
     
    reactor.core.publisher.Mono<io.vavr.control.Option<S>>
    getAggregate(Id entityId)
     
    reactor.core.publisher.Mono<io.vavr.control.Option<S>>
    getAggregate(TxCtx ctx, Id entityId)
     
    reactor.core.publisher.Mono<io.vavr.collection.Map<Id,io.vavr.control.Option<S>>>
    getAggregates(TxCtx ctx, io.vavr.collection.List<Id> entityIds)
     
    default reactor.core.publisher.Mono<io.vavr.control.Option<S>>
    getSnapshot(TxCtx transactionContext, Id id)
     
    default reactor.core.publisher.Mono<io.vavr.collection.List<S>>
    getSnapshots(TxCtx transactionContext, io.vavr.collection.List<Id> ids)
     
    default reactor.core.publisher.Mono<io.vavr.Tuple0>
    storeSnapshot(TxCtx transactionContext, Id id, io.vavr.control.Option<S> state)
     
    default fr.maif.eventsourcing.AggregateStore<S,Id,TxCtx>
     
  • Method Details

    • getAggregate

      reactor.core.publisher.Mono<io.vavr.control.Option<S>> getAggregate(Id entityId)
    • getAggregate

      reactor.core.publisher.Mono<io.vavr.control.Option<S>> getAggregate(TxCtx ctx, Id entityId)
    • getAggregates

      reactor.core.publisher.Mono<io.vavr.collection.Map<Id,io.vavr.control.Option<S>>> getAggregates(TxCtx ctx, io.vavr.collection.List<Id> entityIds)
    • storeSnapshot

      default reactor.core.publisher.Mono<io.vavr.Tuple0> storeSnapshot(TxCtx transactionContext, Id id, io.vavr.control.Option<S> state)
    • getSnapshot

      default reactor.core.publisher.Mono<io.vavr.control.Option<S>> getSnapshot(TxCtx transactionContext, Id id)
    • getSnapshots

      default reactor.core.publisher.Mono<io.vavr.collection.List<S>> getSnapshots(TxCtx transactionContext, io.vavr.collection.List<Id> ids)
    • buildAggregateAndStoreSnapshot

      default <E extends fr.maif.eventsourcing.Event> reactor.core.publisher.Mono<io.vavr.control.Option<S>> buildAggregateAndStoreSnapshot(TxCtx ctx, fr.maif.eventsourcing.EventHandler<S,E> eventHandler, io.vavr.control.Option<S> state, Id id, io.vavr.collection.List<E> events, io.vavr.control.Option<Long> lastSequenceNum)
    • toAggregateStore

      default fr.maif.eventsourcing.AggregateStore<S,Id,TxCtx> toAggregateStore()
    • fromAggregateStore

      static <S extends fr.maif.eventsourcing.State<S>, Id, TxCtx> ReactorAggregateStore<S,Id,TxCtx> fromAggregateStore(fr.maif.eventsourcing.AggregateStore<S,Id,TxCtx> aggregateStore)