Package com.btcvelocity.api.queue
Enum Class ServerStatus
- All Implemented Interfaces:
Serializable,Comparable<ServerStatus>,Constable
Enumerates the status of a backend server as seen by the queue system.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe server is online but under elevated load (mspt between 40 and 60).The server is online but at capacity.The server is unreachable or has failed to respond.The server is online and accepting player connections at full capacity.The server is under heavy load (mspt above 60) and should not receive additional players until its health recovers.The server responded but is in a warmup period. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisActive()Returnstrueif the server is reachable and eligible for player transfers.booleanisLoaded()Returnstrueif this status indicates the server is under load and transfers should be throttled.static ServerStatusReturns the enum constant of this class with the specified name.static ServerStatus[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
OFFLINE
The server is unreachable or has failed to respond. No players will be transferred. -
WAITING
The server responded but is in a warmup period. Players remain queued until the delay elapses. -
ONLINE
The server is online and accepting player connections at full capacity. -
FULL
The server is online but at capacity. Only players with the full-bypass permission will be transferred. -
DEGRADED
The server is online but under elevated load (mspt between 40 and 60). It remains eligible for player transfers, but the queue should use a reduced transfer batch size to avoid overloading it further. -
OVERLOADED
The server is under heavy load (mspt above 60) and should not receive additional players until its health recovers. Players remain queued until the server is no longer overloaded.
-
-
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
-
isActive
public boolean isActive()Returnstrueif the server is reachable and eligible for player transfers. This coversONLINE,FULLandDEGRADED.DEGRADEDservers are still considered active so that queues can continue to drain, albeit at a reduced batch size.OVERLOADEDservers are not active and will not receive transfers until they recover.- Returns:
trueforONLINE,FULLandDEGRADED,falseotherwise
-
isLoaded
public boolean isLoaded()Returnstrueif this status indicates the server is under load and transfers should be throttled.- Returns:
trueforDEGRADEDandOVERLOADED
-