Enum ApplicationState

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ApplicationState>

    public enum ApplicationState
    extends java.lang.Enum<ApplicationState>
    The various "states" exchanged through Gossip.

    Important Note: Gossip uses the ordinal of this enum in the messages it exchanges, so values in that enum should not be re-ordered or removed. The end of this enum should also always include some "padding" so that if newer versions add new states, old nodes that don't know about those new states don't "break" deserializing those states.

    • Method Detail

      • values

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

        public static ApplicationState valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null