Enum Class JournalState
- All Implemented Interfaces:
Serializable, Comparable<JournalState>, Constable
檔案交易事件的狀態
描述一筆檔案操作相對於資料庫交易的生命週期位置。sweep(下一階段)依此判定孤兒:
CREATED過 grace 仍無CONFIRMED/ROLLED_BACK→ 模糊(可能 commit 後崩潰)→ 報告,不自動刪ROLLED_BACK但實體檔案仍在 → 補償刪除失敗 → 可證明孤兒 → 安全刪除CONFIRMED但實體檔案不存在 → 延後刪除失敗或外部刪除 → 報告DELETE_PENDING久未變DELETED→ afterCommit 未跑到(崩潰)→ 重試刪除
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription業務交易已 commit,檔案被合法參照(無交易時的操作也直接記為此狀態)persist/store 的實體操作已完成,但業務交易尚未 commitdelete 已登記,延到 commit 後才執行延後刪除已完成業務交易 rollback,補償刪除已觸發 -
Method Summary
Modifier and TypeMethodDescriptionstatic JournalStateReturns the enum constant of this class with the specified name.static JournalState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CREATED
persist/store 的實體操作已完成,但業務交易尚未 commit -
CONFIRMED
業務交易已 commit,檔案被合法參照(無交易時的操作也直接記為此狀態) -
ROLLED_BACK
業務交易 rollback,補償刪除已觸發 -
DELETE_PENDING
delete 已登記,延到 commit 後才執行 -
DELETED
延後刪除已完成
-
-
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
-