Package kalix.javasdk.eventsourcedentity
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>
An Effect is a description of what Kalix needs to do after the command is handled.
 You can think of it as a set of instructions you are passing to Kalix. Kalix will process the instructions on your
 behalf and ensure that any data that needs to be persisted will be persisted.
 
Each Kalix component defines its own effects, which are a set of predefined operations that match the capabilities of that component.
An EventSourcedEntity Effect can either:
- emit events and send a reply to the caller
- directly reply to the caller if the command is not requesting any state change
- rejected the command by returning an error
- instruct Kalix to delete the entity
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceConstruct the effect that is returned by the command handler.static interface
- 
Method SummaryModifier and TypeMethodDescriptionaddSideEffects(Collection<SideEffect> sideEffects) Attach the given side effects to this reply.addSideEffects(SideEffect... effects) Attach the given effects to this reply.
- 
Method Details- 
addSideEffectsAttach the given side effects to this reply.- Parameters:
- sideEffects- The effects to attach.
- Returns:
- A new reply with the attached effects.
 
- 
addSideEffectsAttach the given effects to this reply.- Parameters:
- effects- The effects to attach.
- Returns:
- A new reply with the attached effects.
 
 
-