Enum Class EventPublication

java.lang.Object
java.lang.Enum<EventPublication>
io.fluxcapacitor.javaclient.modeling.EventPublication
All Implemented Interfaces:
Serializable, Comparable<EventPublication>, Constable

public enum EventPublication extends Enum<EventPublication>
Controls whether an applied update should result in event publication.

This setting can be defined at the aggregate level (via Aggregate) and optionally overridden on specific @Apply methods.

Event publication occurs when an update is applied to an entity. Depending on this setting and the configured EventPublicationStrategy, the update may be published and/or stored.

See Also:
  • Enum Constant Details

    • DEFAULT

      public static final EventPublication DEFAULT
      Inherit the publication behavior from the parent context.

      This may be the enclosing aggregate or the application-level default. If not explicitly configured elsewhere, ALWAYS is used as a fallback.

    • ALWAYS

      public static final EventPublication ALWAYS
      Always publish and/or store the applied update, even if it does not change the entity.

      This is the default behavior if no other setting is specified.

    • NEVER

      public static final EventPublication NEVER
      Never publish or store applied updates.

      Useful for aggregates where event sourcing is disabled or updates should remain private.

    • IF_MODIFIED

      public static final EventPublication IF_MODIFIED
      Only publish or store the update if the entity's state is actually modified by the application.

      This avoids unnecessary event traffic and eliminates the need for InterceptApply methods that suppress no-op updates.

  • Method Details

    • values

      public static EventPublication[] 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

      public static EventPublication valueOf(String name)
      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 name
      NullPointerException - if the argument is null