Enum ServerStatus

    • Enum Constant Detail

      • INVALID_STATUS

        public static final ServerStatus INVALID_STATUS
        Invalid status: special status used in state machine implementation to return an error (impossible status). See class StatusMachine class for further details.
      • NOT_CONNECTED_STATUS

        public static final ServerStatus NOT_CONNECTED_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.
      • NORMAL_STATUS

        public static final ServerStatus NORMAL_STATUS
        DS in normal status.

        When: everything is fine

        Properties:

        • no referrals
        • updates received from RS
      • DEGRADED_STATUS

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

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

        public static final ServerStatus BAD_GEN_ID_STATUS
        DS in bad generation id status.
        • A reset generation id order has been sent to topology
        • Fractional replication configuration is inconsistent
        • A Replica is not covered by the changelog
        Properties:
        • no referrals returned
        • no updates received from RS
    • Method Detail

      • values

        public static ServerStatus[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ServerStatus c : ServerStatus.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ServerStatus valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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
      • getValue

        public byte getValue()
        Get a numeric representation of the status.
        Returns:
        The numeric representation of the 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.