Interface EventSourcedEntity.Effect<T>

Type Parameters:
T - The type of the message that must be returned by this call.
Enclosing class:
EventSourcedEntity<S,E>

public static interface EventSourcedEntity.Effect<T>
A return type to allow returning forwards or failures, and attaching effects to messages.
  • Method Details

    • addSideEffects

      EventSourcedEntity.Effect<T> addSideEffects(Collection<SideEffect> sideEffects)
      Attach the given side effects to this reply.
      Parameters:
      sideEffects - The effects to attach.
      Returns:
      A new reply with the attached effects.
    • addSideEffects

      EventSourcedEntity.Effect<T> addSideEffects(SideEffect... effects)
      Attach the given effects to this reply.
      Parameters:
      effects - The effects to attach.
      Returns:
      A new reply with the attached effects.