Enum Class EventPublicationStrategy
java.lang.Object
java.lang.Enum<EventPublicationStrategy>
io.fluxcapacitor.javaclient.modeling.EventPublicationStrategy
- All Implemented Interfaces:
Serializable
,Comparable<EventPublicationStrategy>
,Constable
Strategy for controlling how applied updates (typically from
@Apply
methods)
are handled in terms of storage and publication.
This strategy determines whether an update is published, stored in the event store, or both. It can be configured at the aggregate level, or overridden per update.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionInherit the strategy from the enclosing aggregate or global default.Publish the update to event handlers but do not store it in the event store.Store the applied update in the event store and also publish it to event handlers.Store the applied update in the event store but do not publish it to event handlers. -
Method Summary
Modifier and TypeMethodDescriptionstatic EventPublicationStrategy
Returns the enum constant of this class with the specified name.static EventPublicationStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Inherit the strategy from the enclosing aggregate or global default.If not configured anywhere, the fallback is
STORE_AND_PUBLISH
. -
STORE_AND_PUBLISH
Store the applied update in the event store and also publish it to event handlers.This is the default behavior used for event-sourced aggregates.
-
STORE_ONLY
Store the applied update in the event store but do not publish it to event handlers.Useful when updates must be persisted but should not trigger side effects or listeners.
-
PUBLISH_ONLY
Publish the update to event handlers but do not store it in the event store.This disables event sourcing for the update and is typically used for transient projections or side-effect-only operations.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-