package valueentity
- Alphabetic
- Public
- Protected
Type Members
- trait CommandContext extends ValueEntityContext with MetadataContext
A value based entity command context.
- abstract class ValueEntity[S] extends AnyRef
Value Entities persist their state on every change.
Value Entities persist their state on every change. You can think of them as a Key-Value entity where the key is the entity id and the value is the state of the entity.
Kalix Value Entities have nothing in common with the domain-driven design concept of Value Objects. The Value in the name refers to the direct modification of the entity's state.
When implementing a Value Entity, you first define what will be its internal state (your domain model), and the commands it will handle (mutation requests).
Each command is handled by a command handler. Command handlers are methods returning an kalix.scalasdk.valueentity.ValueEntity.Effect. When handling a command, you use the Effect API to:
- update the entity state 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
- S
The type of the state for this entity.
- trait ValueEntityContext extends EntityContext
Root context for all value based entity contexts.
- trait ValueEntityOptions extends EntityOptions
Root entity options for all value based entities.
- trait ValueEntityProvider[S, E <: ValueEntity[S]] extends AnyRef
Register a value based entity in
kalix.scalasdk.Kalix
using aValueEntityProvider
.Register a value based entity in
kalix.scalasdk.Kalix
using aValueEntityProvider
. The concreteValueEntityProvider
is generated for the specific entities defined in Protobuf, for exampleCustomerEntityProvider
.
Value Members
- object ValueEntity
- object ValueEntityOptions