Enum Class BackupTaskStatus

java.lang.Object
java.lang.Enum<BackupTaskStatus>
net.bluemind.dataprotect.api.BackupTaskStatus
All Implemented Interfaces:
Serializable, Comparable<BackupTaskStatus>, Constable

public enum BackupTaskStatus extends Enum<BackupTaskStatus>
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.

  • Enum Constant Details

    • OK

      public static final BackupTaskStatus OK
    • WARNING

      public static final BackupTaskStatus WARNING
    • POSTOPS_ERROR

      public static final BackupTaskStatus POSTOPS_ERROR
      taskSucceeded = true is intentional: the backup itself worked, only the post-backup script failed on a node. This status touches no PartGeneration, so it can only be detected through the task result.
    • ERROR

      public static final BackupTaskStatus ERROR
    • INVALID_STATE

      public static final BackupTaskStatus INVALID_STATE
      No part-level equivalent: the backup could not start because a server was unreachable, or it was cancelled before completing a PartGeneration.
  • Field Details

    • taskSucceeded

      public final boolean taskSucceeded
    • log

      public final String log
  • Method Details

    • values

      public static BackupTaskStatus[] 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 BackupTaskStatus 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
    • worstOf

      public BackupTaskStatus worstOf(BackupTaskStatus other)
      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

      public static Optional<BackupTaskStatus> fromTaskResult(String taskResult)
      Reads back a status published as TaskStatus.result. Returns Optional.empty() when the task did not report one, which happens when it failed before its own reporting could run.