Enum Class ServerStatus

java.lang.Object
java.lang.Enum<ServerStatus>
org.opends.server.replication.common.ServerStatus
All Implemented Interfaces:
Serializable, Comparable<ServerStatus>, java.lang.constant.Constable

public enum ServerStatus extends Enum<ServerStatus>
The various status a DS can take.
  • 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
    DS in bad data status.
    Deprecated status: DS in degraded status.
    DS in full update (local DS is initialized from another DS).
    Invalid status: special status used to return an error (impossible status).
    DS in normal status.
    Not connected status: special status used as initial status of the state machine in the DS context only as already connected while state machine considered in RS context.
    Replica is no more covered by the changelog because it is older than the purge delay.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte
    Get a numeric representation of the status.
    boolean
    Returns whether the transition going from this status to toStatus is valid.
    boolean
    Checks if a given status is valid as an entering status for the state machine.
    toStatusCompatibleWith(short protocolVersion)
    Compute a compatible status for servers not implementing the same replication protocol version as this server.
    Get a user readable string representing this status (User friendly string for monitoring purpose).
    valueOf(byte value)
    Returns the ServerStatus matching the passed status numeric representation.
    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

    • INVALID

      public static final ServerStatus INVALID
      Invalid status: special status used to return an error (impossible status).
    • NOT_CONNECTED

      public static final ServerStatus NOT_CONNECTED
      Not connected status: special status used as initial status of the state machine in the DS context only as already connected while state machine considered in RS context.
    • NORMAL

      public static final ServerStatus NORMAL
      DS in normal status.

      When: everything is fine

      Properties:

      • no referrals
      • updates received from RS
    • DEGRADED

      public static final ServerStatus DEGRADED
      Deprecated status: DS in degraded status.

      When: DS is too late compared to number of updates RS has to send

      Properties:

      • referrals returned
      • updates received from RS
    • FULL_UPDATE

      public static final ServerStatus FULL_UPDATE
      DS in full update (local DS is initialized from another DS). (if local DS initializes another, it is not in this status)

      A better name would be "INITIALIZING". Although we need to check the impact renaming will have on tools and mixed topologies.

      When: A full update is being performed to our local DS

      Properties:

      • referrals returned
      • no updates received from RS
    • BAD_DATA

      public static final ServerStatus BAD_DATA
      DS in bad data status.
      • A reset generation id order has been sent to topology
      • Fractional replication configuration is inconsistent
      Properties:
      • no referrals returned
      • RS does not send changes to replica having this status
    • TOO_LATE

      public static final ServerStatus TOO_LATE
      Replica is no more covered by the changelog because it is older than the purge delay. Properties:
      • no referrals returned
      • RS do not send changes to replica having this status
  • 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
    • valueOf

      public static ServerStatus valueOf(byte value) throws IllegalArgumentException
      Returns the ServerStatus matching the passed status numeric representation.
      Parameters:
      value - The numeric value for the status to return
      Returns:
      The matching ServerStatus
      Throws:
      IllegalArgumentException - If provided status value is wrong
    • isValidInitialStatus

      public boolean isValidInitialStatus()
      Checks if a given status is valid as an entering status for the state machine.
      Returns:
      True if the passed status is a valid initial status.
    • isTransitionAllowedTo

      public boolean isTransitionAllowedTo(ServerStatus toStatus)
      Returns whether the transition going from this status to toStatus is valid.
      Parameters:
      toStatus - The status we are trying to go to.
      Returns:
      true if transition from this status to toStatus is valid, false otherwise
    • getValue

      public byte getValue()
      Get a numeric representation of the status.
      Returns:
      The numeric representation of the status
    • toStatusCompatibleWith

      public ServerStatus toStatusCompatibleWith(short protocolVersion)
      Compute a compatible status for servers not implementing the same replication protocol version as this server.
      Parameters:
      protocolVersion - the replication version of the peer server.
      Returns:
      the compatible status
    • toString

      public String toString()
      Get a user readable string representing this status (User friendly string for monitoring purpose).
      Overrides:
      toString in class Enum<ServerStatus>
      Returns:
      A user readable string representing this status.