Enum Class NaruPlanItemStatus

java.lang.Object
java.lang.Enum<NaruPlanItemStatus>
net.thevpc.naru.ext.tools.plan.NaruPlanItemStatus
All Implemented Interfaces:
Serializable, Comparable<NaruPlanItemStatus>, Constable

public enum NaruPlanItemStatus extends Enum<NaruPlanItemStatus>
Lifecycle of a single NaruPlanItem.

The happy path is PENDING -> READY -> RUNNING -> VALIDATING -> DONE. VALIDATING is only ever entered for items that declare a validator; items without one go straight from RUNNING to DONE.

DONE cannot be set directly by an executor. The manager only accepts it through a completion call that also carries the validation verdict, so a tool that is handed the plan tag cannot mark unvalidated work as finished.

  • Enum Constant Details

    • PENDING

      public static final NaruPlanItemStatus PENDING
      Declared, but dependencies are not yet all DONE. This is also the state an item returns to when a dependency is reopened.
    • READY

      public static final NaruPlanItemStatus READY
      All dependencies are DONE; eligible for execution once the plan is activated and a concurrency slot is free. Recomputed by NaruPlanManager.recomputeAndFill(String) , never set by a caller.
    • RUNNING

      public static final NaruPlanItemStatus RUNNING
      An item-task has been spawned and has not reported back yet.
    • VALIDATING

      public static final NaruPlanItemStatus VALIDATING
      The item-task finished and a validator is judging the result.
    • DONE

      public static final NaruPlanItemStatus DONE
      Finished and accepted. Terminal.
    • BLOCKED

      public static final NaruPlanItemStatus BLOCKED
      The executor reported it cannot proceed. Terminal until a human intervenes.
    • FAILED

      public static final NaruPlanItemStatus FAILED
      The validator rejected the result, or the attempt budget was exhausted. Terminal until a human intervenes.
  • Method Details

    • values

      public static NaruPlanItemStatus[] 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 NaruPlanItemStatus 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
    • isTerminal

      public boolean isTerminal()
      Statuses that will not change on their own. Anything else is eligible for automatic progression by recomputeAndFill().
    • parse

      public static net.thevpc.nuts.util.NOptional<NaruPlanItemStatus> parse(String s)