Enum LeaderLocation

    • Enum Constant Detail

      • LOCAL

        public static final LeaderLocation LOCAL
        The leader is co-located on this node.
      • REMOTE

        public static final LeaderLocation REMOTE
        The leader is resident on a different node.
      • UNKNOWN

        public static final LeaderLocation UNKNOWN
        The leader is residence is currently unknown. This is a transition state during a leader failure, which can be caused by a network partition. This state is not observed during a leadership transfer vote initiated by the leader shutting down.
    • Method Detail

      • values

        public static LeaderLocation[] 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 (LeaderLocation c : LeaderLocation.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static LeaderLocation 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