Interface KeyValueEntity.Effect.OnSuccessBuilder<S>

Type Parameters:
S - The type of the state for this entity
Enclosing interface:
KeyValueEntity.Effect<T>

public static interface KeyValueEntity.Effect.OnSuccessBuilder<S>
Builder for chaining a reply after a successful state operation like updateState or deleteEntity. This allows you to both modify the entity and send a response to the caller in a single effect.
  • Method Summary

    Modifier and Type
    Method
    Description
    thenReply(T message)
    Sends a reply message to the caller after the state operation (update or delete) completes successfully.
    thenReply(T message, Metadata metadata)
    Sends a reply message with additional metadata to the caller after the state operation completes successfully.
  • Method Details

    • thenReply

      <T> KeyValueEntity.Effect<T> thenReply(T message)
      Sends a reply message to the caller after the state operation (update or delete) completes successfully. This is typically used to confirm the operation and return the new state or operation result.
      Type Parameters:
      T - the type of the reply message
      Parameters:
      message - the payload of the reply message
      Returns:
      an effect that will perform the state operation and then send the reply
    • thenReply

      <T> KeyValueEntity.Effect<T> thenReply(T message, Metadata metadata)
      Sends a reply message with additional metadata to the caller after the state operation completes successfully.
      Type Parameters:
      T - the type of the reply message
      Parameters:
      message - the payload of the reply message
      metadata - additional metadata to include with the reply
      Returns:
      an effect that will perform the state operation and then send the reply