Package kalix.javasdk.eventsourcedentity
Interface EventSourcedEntity.Effect.OnSuccessBuilder<S>
- Enclosing interface:
- EventSourcedEntity.Effect<T>
public static interface EventSourcedEntity.Effect.OnSuccessBuilder<S>
-
Method Summary
Modifier and TypeMethodDescriptionDelete the entity.thenAddSideEffect
(Function<S, SideEffect> sideEffect) Attach the given side effect to this reply from the new state.<T> EventSourcedEntity.Effect<T>
thenForward
(Function<S, DeferredCall<? extends Object, T>> serviceCall) Create a forward reply after for exampleemitEvent
.<T> EventSourcedEntity.Effect<T>
Reply after for exampleemitEvent
.<T> EventSourcedEntity.Effect<T>
Reply after for exampleemitEvent
.
-
Method Details
-
deleteEntity
EventSourcedEntity.Effect.OnSuccessBuilder<S> deleteEntity()Delete the entity. No addition events are allowed. -
thenReply
Reply after for exampleemitEvent
.- Type Parameters:
T
- The type of the message that must be returned by this call.- Parameters:
replyMessage
- Function to create the reply message from the new state.- Returns:
- A message reply.
-
thenReply
Reply after for exampleemitEvent
.- Type Parameters:
T
- The type of the message that must be returned by this call.- Parameters:
replyMessage
- Function to create the reply message from the new state.metadata
- The metadata for the message.- Returns:
- A message reply.
-
thenForward
<T> EventSourcedEntity.Effect<T> thenForward(Function<S, DeferredCall<? extends Object, T>> serviceCall) Create a forward reply after for exampleemitEvent
.- Type Parameters:
T
- The type of the message that must be returned by this call.- Parameters:
serviceCall
- The service call representing the forward.- Returns:
- A forward reply.
-
thenAddSideEffect
Attach the given side effect to this reply from the new state.- Parameters:
sideEffect
- The effect to attach.- Returns:
- A new reply with the attached effect.
-