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 EventSourcedEntityOptionsdefaults()Create a default entity option for an event sourced entity.intwithForwardHeaders(Set<String> headers) Ask Kalix to forward these headers from the incoming request as metadata headers for the incoming commands.withPassivationStrategy(PassivationStrategy strategy) Deprecated, for removal: This API element is subject to removal in a future version.passivation strategy is ignoredwithSnapshotEvery(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, passivationStrategy
-
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)
-
withPassivationStrategy
@Deprecated(since="1.1.4", forRemoval=true) EventSourcedEntityOptions withPassivationStrategy(PassivationStrategy strategy) Deprecated, for removal: This API element is subject to removal in a future version.passivation strategy is ignoredDescription copied from interface:EntityOptionsCreate an entity option with the given passivation strategy.- Specified by:
withPassivationStrategyin interfaceEntityOptions- Parameters:
strategy- to be used- Returns:
- the entity option
-
withForwardHeaders
Description copied from interface:EntityOptionsAsk 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:
withForwardHeadersin interfacekalix.javasdk.impl.ComponentOptions- Specified by:
withForwardHeadersin interfaceEntityOptions
-
defaults
Create a default entity option for an event sourced entity.- Returns:
- the entity option
-