Enum Class ExternalizationMode

java.lang.Object
java.lang.Enum<ExternalizationMode>
org.springframework.modulith.events.ExternalizationMode
All Implemented Interfaces:
Serializable, Comparable<ExternalizationMode>, Constable

public enum ExternalizationMode extends Enum<ExternalizationMode>
Different modes of event externalization.
Since:
2.1
Author:
Roland Beisel
  • Enum Constant Details

    • MODULE_LISTENER

      public static final ExternalizationMode MODULE_LISTENER
      Externalizes events via a module listener that sends events to the target after the transaction commits. This is the default behavior.
    • OUTBOX

      public static final ExternalizationMode OUTBOX
      Externalizes events via the outbox pattern. Events are persisted to an outbox table within the same transaction and later processed asynchronously.
  • Field Details

  • Method Details

    • values

      public static ExternalizationMode[] 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 ExternalizationMode 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
    • from

      public static ExternalizationMode from(Environment environment)
      Looks up the ExternalizationMode from the given environment or uses MODULE_LISTENER as default.
      Parameters:
      environment - must not be null.
      Returns:
      will never be null.