Enum Class SagaStatus

java.lang.Object
java.lang.Enum<SagaStatus>
cloud.opencode.base.event.saga.SagaStatus
All Implemented Interfaces:
Serializable, Comparable<SagaStatus>, Constable

public enum SagaStatus extends Enum<SagaStatus>
Saga Status - The status of a saga execution Saga 状态 - saga 执行的状态

Features | 主要功能:

  • Saga lifecycle status tracking - Saga生命周期状态跟踪
  • Seven distinct states - 七种不同状态

Usage Examples | 使用示例:

SagaStatus status = result.status();
if (status == SagaStatus.COMPENSATED) {
    // Handle compensation
}

Security | 安全性:

  • Thread-safe: Yes (immutable) - 线程安全: 是(不可变)
Since:
JDK 25, opencode-base-event V1.0.0
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Enum Constant Details

    • RUNNING

      public static final SagaStatus RUNNING
      Saga is currently running
    • COMPLETED

      public static final SagaStatus COMPLETED
      Saga completed successfully
    • COMPENSATED

      public static final SagaStatus COMPENSATED
      Saga failed and compensation was executed
    • FAILED

      public static final SagaStatus FAILED
      Saga failed (compensation may have failed too)
    • CANCELLED

      public static final SagaStatus CANCELLED
      Saga was cancelled
    • PENDING

      public static final SagaStatus PENDING
      Saga is pending execution
    • PAUSED

      public static final SagaStatus PAUSED
      Saga is paused
  • Method Details

    • values

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