Enum Class ReplayStatus

java.lang.Object
java.lang.Enum<ReplayStatus>
org.axonframework.messaging.eventhandling.replay.ReplayStatus
All Implemented Interfaces:
Serializable, Comparable<ReplayStatus>, Constable

public enum ReplayStatus extends Enum<ReplayStatus>
Type that can be used as parameter of Event Handler methods that indicates whether a message is delivered as part of a replay, or in regular operations. Messages delivered as part of a replay may have been handled by this handler before.

Note that this is only sensible for event handlers that are assigned to a StreamingEventProcessor. Event Handlers assigned to a different mechanism, such as the SubscribingEventProcessor or certain extensions, will always receive ReplayStatus.REGULAR as value.

Since:
3.2
Author:
Allard Buijze
See Also:
  • Enum Constant Details

    • REPLAY

      public static final ReplayStatus REPLAY
      Indicates the message is delivered as part of a replay (and may have been delivered before)
    • REGULAR

      public static final ReplayStatus REGULAR
      Indicates the message is not delivered as part of a replay (and has not been delivered before).
  • Method Details

    • values

      public static ReplayStatus[] 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 ReplayStatus 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
    • isReplay

      public boolean isReplay()
      Indicates whether this status represents a replay.
      Returns:
      true if this status indicates a replay, otherwise false