Package akka.javasdk.keyvalueentity
Interface KeyValueEntity.Effect.Builder<S>
- Type Parameters:
S
- The type of the state for this entity.
- Enclosing interface:
KeyValueEntity.Effect<T>
public static interface KeyValueEntity.Effect.Builder<S>
Construct the effect that is returned by the command handler. The effect describes next
processing actions, such as updating state and sending a reply.
-
Method Summary
Modifier and TypeMethodDescriptionDelete the entity.<T> KeyValueEntity.Effect
<T> Create an error reply.<T> KeyValueEntity.Effect
<T> reply
(T message) Create a message reply.<T> KeyValueEntity.Effect
<T> Create a message reply.updateState
(S newState)
-
Method Details
-
updateState
-
deleteEntity
KeyValueEntity.Effect.OnSuccessBuilder<S> deleteEntity()Delete the entity. No additional updates are allowed afterwards. -
reply
Create a message reply.- Type Parameters:
T
- The type of the message that must be returned by this call.- Parameters:
message
- The payload of the reply.- Returns:
- A message reply.
-
reply
Create a message reply.- Type Parameters:
T
- The type of the message that must be returned by this call.- Parameters:
message
- The payload of the reply.metadata
- The metadata for the message.- Returns:
- A message reply.
-
error
Create an error reply.- Type Parameters:
T
- The type of the message that must be returned by this call.- Parameters:
description
- The description of the error.- Returns:
- An error reply.
-