Enum Class SagaStatus
- All Implemented Interfaces:
Serializable, Comparable<SagaStatus>, Constable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic SagaStatusReturns the enum constant of this class with the specified name.static SagaStatus[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RUNNING
Saga is currently running -
COMPLETED
Saga completed successfully -
COMPENSATED
Saga failed and compensation was executed -
FAILED
Saga failed (compensation may have failed too) -
CANCELLED
Saga was cancelled -
PENDING
Saga is pending execution -
PAUSED
Saga is paused
-
-
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
-