- All Implemented Interfaces:
Serializable, Comparable<TunnelTestStatus>, java.lang.constant.Constable
Test status for tunnel testing display.
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThree consecutive failures, marked for removal.One or two consecutive failures.Recent successful test.Scheduled for early expiry due to pool over budget.Test is currently in progress.Scheduled for early expiry due to slow tunnel.No test has been run yet.Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleanisDead()Whether this status marks the tunnel dead: three or more consecutive test failures, i.e.booleanWhether this status marks a transient failure: one or two consecutive test failures.booleanWhether a tunnel in this status must be withheld from healthy capacity counts and from endpoint selection.static TunnelTestStatusReturns the enum constant of this class with the specified name.static TunnelTestStatus[]values()Returns an array containing the constants of this enum class, in the order they are declared.
Enum Constant Details
UNTESTED
No test has been run yet.TESTING
Test is currently in progress.GOOD
Recent successful test.FAILING
One or two consecutive failures.FAILED
Three consecutive failures, marked for removal.TOO_SLOW
Scheduled for early expiry due to slow tunnel.OVER_BUDGET
Scheduled for early expiry due to pool over budget.
Constructor Details
TunnelTestStatus
private TunnelTestStatus()
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
isDead
public boolean isDead()Whether this status marks the tunnel dead: three or more consecutive test failures, i.e.MAX_CONSECUTIVE_TEST_FAILURES. A dead tunnel is not capacity, is not offered as an endpoint, and is not rehabilitated by a traffic stamp — only a real passing test or a rebuild returns it toGOOD.- Returns:
- true only for
FAILED
isFailing
isUnusable
public boolean isUnusable()Whether a tunnel in this status must be withheld from healthy capacity counts and from endpoint selection.Defined here rather than at each call site because the counting and selection paths previously disagreed: the scan gates excluded both
FAILEDandFAILINGwhile the usable-count helpers excluded onlyFAILING, so a pool holding nothing but dead tunnels still reported full capacity and suppressed its own pre-build. Callers that need a narrower rule should askisDead()orisFailing()directly.