Packages

p

kalix.scalasdk

eventsourcedentity

package eventsourcedentity

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. trait CommandContext extends EventSourcedEntityContext with MetadataContext

    An event sourced command context.

  2. trait EventContext extends EventSourcedEntityContext
  3. abstract class EventSourcedEntity[S] extends AnyRef

    The Event Sourced state model captures changes to data by storing events in a journal.

    The Event Sourced state model captures changes to data by storing events in a journal. The current entity state is derived from the emitted events.

    When implementing an Event Sourced Entity, you first define what will be its internal state (your domain model), the commands it will handle (mutation requests) and the events it will emit (state changes).

    Each command is handled by a command handler. Command handlers are methods returning an kalix.scalasdk.eventsourcedentity.EventSourcedEntity.Effect. When handling a command, you use the Effect API to:

    • emit events and build a reply
    • directly returning 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

    Each event is handled by an event handler method and should return an updated state for the entity.

    S

    The type of the state for this entity.

  4. trait EventSourcedEntityContext extends EntityContext

    Root context for all event sourcing contexts.

  5. trait EventSourcedEntityOptions extends EntityOptions

    Root entity options for all event sourcing entities.

  6. trait EventSourcedEntityProvider[S, E <: EventSourcedEntity[S]] extends AnyRef

    Register an event sourced entity in kalix.scalasdk.Kalix using a EventSourcedEntityProvider.

    Register an event sourced entity in kalix.scalasdk.Kalix using a EventSourcedEntityProvider. The concrete EventSourcedEntityProvider is generated for the specific entities defined in Protobuf, for example CustomerEntityProvider .

Ungrouped