Interface ReplicatedEntity.Effect<R>

  • Type Parameters:
    R - The type of the reply message that must be returned by this call.
    Enclosing class:
    ReplicatedEntity<D extends com.akkaserverless.replicatedentity.ReplicatedData>

    public static interface ReplicatedEntity.Effect<R>
    A return type to allow returning forwards or failures, and attaching effects to messages.
    • Method Detail

      • addSideEffects

        ReplicatedEntity.Effect<R> addSideEffects​(java.util.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

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