Interface ModifiableAggregateRoot.CommitHandler

Enclosing class:
ModifiableAggregateRoot<T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ModifiableAggregateRoot.CommitHandler
  • Method Details

    • handle

      CompletableFuture<Void> handle(Entity<?> model, List<AppliedEvent> unpublished, Entity<?> beforeUpdate)
      Commits the aggregate state and any unpublished events.
      Parameters:
      model - aggregate state after the change
      unpublished - events that must be committed
      beforeUpdate - aggregate state before the change
      Returns:
      future that completes when all commit work has finished