Enum Class BackupTaskStatus
- All Implemented Interfaces:
Serializable, Comparable<BackupTaskStatus>, Constable
Task-level outcome of a full backup, independent from the part-level
GenerationStatus of each PartGeneration.
It is never persisted: the backup task publishes taskSucceeded and
Enum.name() as the state and result of a
TaskStatus, and the scheduled job reads them back through
fromTaskResult(String). Both sides share this enum so the wire value
cannot drift.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo part-level equivalent: the backup could not start because a server was unreachable, or it was cancelled before completing aPartGeneration.taskSucceeded = trueis intentional: the backup itself worked, only the post-backup script failed on a node. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<BackupTaskStatus> fromTaskResult(String taskResult) Reads back a status published asTaskStatus.result.booleanstatic BackupTaskStatusReturns the enum constant of this class with the specified name.static BackupTaskStatus[]values()Returns an array containing the constants of this enum class, in the order they are declared.worstOf(BackupTaskStatus other) Aggregates two outcomes, keeping the most severe one.
-
Enum Constant Details
-
OK
-
WARNING
-
POSTOPS_ERROR
taskSucceeded = trueis intentional: the backup itself worked, only the post-backup script failed on a node. This status touches noPartGeneration, so it can only be detected through the task result. -
ERROR
-
INVALID_STATE
No part-level equivalent: the backup could not start because a server was unreachable, or it was cancelled before completing aPartGeneration.
-
-
Field Details
-
taskSucceeded
public final boolean taskSucceeded -
log
-
-
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
-
worstOf
Aggregates two outcomes, keeping the most severe one. Backup severity only ever grows: a late warning must not mask an earlier error. -
hasWarnings
public boolean hasWarnings() -
fromTaskResult
Reads back a status published asTaskStatus.result. ReturnsOptional.empty()when the task did not report one, which happens when it failed before its own reporting could run.
-