Enum Class Liveness
- All Implemented Interfaces:
Serializable, Comparable<Liveness>, Constable
How responsive a script runner is, as judged by the runtime's watchdog.
Orthogonal to ScriptHealth, which records crashes. A
script that has never thrown is ScriptHealth.HEALTHY and can still be
ABANDONED: refusing to stop is not the same failure as throwing.
LIVE and STALLED are recoverable — a runner moves freely
between them as onLoop calls start and finish. REVOKED and
ABANDONED are terminal: both mean the runtime has given up on the
thread ever draining and has stopped trusting it, and neither is ever left.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRevoked and still alive.Looping normally, or parked between loops.Stop was requested, the thread did not drain, and the runtime has cut the runner off from the game: every RPC it attempts from here on throws.Still inside a singleonLoopcall past the watchdog's threshold. -
Method Summary
Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
LIVE
Looping normally, or parked between loops. -
STALLED
Still inside a singleonLoopcall past the watchdog's threshold. Advisory when no stop is pending — a blocking walk legitimately parks insideonLoopfor minutes — and the first stage of the stop escalation once one is. -
REVOKED
Stop was requested, the thread did not drain, and the runtime has cut the runner off from the game: every RPC it attempts from here on throws. Most stuck scripts unwind on their own at this point, because they are usually looping on an API call rather than spinning in pure computation. Terminal. -
ABANDONED
Revoked and still alive. The thread cannot be killed — Java has noThread.stop— so it is quarantined instead: kept visible to the user, and its classloader pinned so a reload never closes it underneath. Terminal.
-
-
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()truefor the states a runner can never leave.
-