Enum Class ServerStatus

java.lang.Object
java.lang.Enum<ServerStatus>
com.btcvelocity.api.queue.ServerStatus
All Implemented Interfaces:
Serializable, Comparable<ServerStatus>, Constable

public enum ServerStatus extends Enum<ServerStatus>
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 Constants
    Enum Constant
    Description
    The 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 Type
    Method
    Description
    boolean
    Returns true if the server is reachable and eligible for player transfers.
    boolean
    Returns true if this status indicates the server is under load and transfers should be throttled.
    Returns the enum constant of this class with the specified name.
    static ServerStatus[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • OFFLINE

      public static final ServerStatus OFFLINE
      The server is unreachable or has failed to respond. No players will be transferred.
    • WAITING

      public static final ServerStatus WAITING
      The server responded but is in a warmup period. Players remain queued until the delay elapses.
    • ONLINE

      public static final ServerStatus ONLINE
      The server is online and accepting player connections at full capacity.
    • FULL

      public static final ServerStatus FULL
      The server is online but at capacity. Only players with the full-bypass permission will be transferred.
    • DEGRADED

      public static final ServerStatus 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

      public static final ServerStatus 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

      public static ServerStatus[] 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 ServerStatus 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
    • isActive

      public boolean isActive()
      Returns true if the server is reachable and eligible for player transfers. This covers ONLINE, FULL and DEGRADED.

      DEGRADED servers are still considered active so that queues can continue to drain, albeit at a reduced batch size. OVERLOADED servers are not active and will not receive transfers until they recover.

      Returns:
      true for ONLINE, FULL and DEGRADED, false otherwise
    • isLoaded

      public boolean isLoaded()
      Returns true if this status indicates the server is under load and transfers should be throttled.
      Returns:
      true for DEGRADED and OVERLOADED