Package kalix.javasdk.eventsourcedentity
Interface EventSourcedEntityOptions
- All Superinterfaces:
kalix.javasdk.impl.ComponentOptions
,EntityOptions
Root entity options for all event sourcing entities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic EventSourcedEntityOptions
defaults()
Create a default entity option for an event sourced entity.int
withForwardHeaders
(Set<String> headers) Ask Kalix to forward these headers from the incoming request as metadata headers for the incoming commands.withSnapshotEvery
(int numberOfEvents) Specifies how snapshots of the entity state should be made: Zero means use default from configuration file.Methods inherited from interface kalix.javasdk.EntityOptions
forwardHeaders
-
Method Details
-
snapshotEvery
int snapshotEvery() -
withSnapshotEvery
Specifies how snapshots of the entity state should be made: Zero means use default from configuration file. Any negative value means never snapshot. Any positive value means snapshot at-or-after that number of events.It is strongly recommended to not disable snapshotting unless it is known that event sourced entity will never have more than 100 events (in which case the default will anyway not trigger any snapshots)
-
withForwardHeaders
Description copied from interface:EntityOptions
Ask Kalix to forward these headers from the incoming request as metadata headers for the incoming commands. By default, no headers except "X-Server-Timing" are forwarded.- Specified by:
withForwardHeaders
in interfacekalix.javasdk.impl.ComponentOptions
- Specified by:
withForwardHeaders
in interfaceEntityOptions
-
defaults
Create a default entity option for an event sourced entity.- Returns:
- the entity option
-