Package net.thevpc.naru.ext.tools.plan
Enum Class NaruPlanItemStatus
- All Implemented Interfaces:
Serializable,Comparable<NaruPlanItemStatus>,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe executor reported it cannot proceed.Finished and accepted.The validator rejected the result, or the attempt budget was exhausted.Declared, but dependencies are not yet allDONE.All dependencies areDONE; eligible for execution once the plan is activated and a concurrency slot is free.An item-task has been spawned and has not reported back yet.The item-task finished and a validator is judging the result. -
Method Summary
Modifier and TypeMethodDescriptionbooleanStatuses that will not change on their own.static net.thevpc.nuts.util.NOptional<NaruPlanItemStatus>static NaruPlanItemStatusReturns the enum constant of this class with the specified name.static NaruPlanItemStatus[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PENDING
Declared, but dependencies are not yet allDONE. This is also the state an item returns to when a dependency is reopened. -
READY
All dependencies areDONE; eligible for execution once the plan is activated and a concurrency slot is free. Recomputed byNaruPlanManager.recomputeAndFill(String), never set by a caller. -
RUNNING
An item-task has been spawned and has not reported back yet. -
VALIDATING
The item-task finished and a validator is judging the result. -
DONE
Finished and accepted. Terminal. -
BLOCKED
The executor reported it cannot proceed. Terminal until a human intervenes. -
FAILED
The validator rejected the result, or the attempt budget was exhausted. Terminal until a human intervenes.
-
-
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
-
isTerminal
public boolean isTerminal()Statuses that will not change on their own. Anything else is eligible for automatic progression byrecomputeAndFill(). -
parse
-