Enum Status

  • All Implemented Interfaces:
    Serializable, Comparable<Status>

    public enum Status
    extends Enum<Status>
    Status information for synchronising the cluster nodes where only one provides the AristaFlow server (singleton) while all others are clients of this server.
    • Enum Constant Detail

      • STARTING

        public static final Status STARTING
        AristaFlow is starting on its node. It has not decided yet whether it is a server or a client.
      • STARTING_SERVER

        public static final Status STARTING_SERVER
        AristaFlow is starting as server on its node.
      • RUNNING_SERVER

        public static final Status RUNNING_SERVER
        AristaFlow is running as server on its node.
      • RESTARTING_SERVER

        public static final Status RESTARTING_SERVER
        The AristaFlow server is restarting on its node. This is used instead of TERMINATING_SERVER to signal the clients that the server will be running again shortly.
      • TERMINATING_SERVER

        public static final Status TERMINATING_SERVER
        The AristaFlow server is terminating on its node.
      • DOUBTFUL_SERVER

        public static final Status DOUBTFUL_SERVER
        The status of the server is doubtful, that is, the server seems to be lost but it is given additional time to recover.
      • LOST_SERVER

        public static final Status LOST_SERVER
        The AristaFlow server has not sent alive signals and is therefore considered lost. As soon as the server sends the signal next time, it has to terminate.
      • STARTING_CLIENT

        public static final Status STARTING_CLIENT
        AristaFlow is starting as client on its node.
      • CONNECTED_CLIENT

        public static final Status CONNECTED_CLIENT
        AristaFlow is running as client on its node and it is connected to the AristaFlow-server.
      • RECONNECTING_CLIENT

        public static final Status RECONNECTING_CLIENT
        AristaFlow is running as client on its node but it has lost connection to the AristaFlow-server. It is trying to reconnect to the server.
      • TERMINATING_CLIENT

        public static final Status TERMINATING_CLIENT
        AristaFlow has been running as client on its node and it is now terminating.
      • RESTARTING_CLIENT

        public static final Status RESTARTING_CLIENT
        AristaFlow has been running as client on its node and it is now restarting. This is used to signal the server and other clients, that this client will be running again shortly (as client).
      • TERMINATED

        public static final Status TERMINATED
        AristaFlow has terminated on its node. Usually this status is used for signalling the termination but not stored in the database. Instead the corresponding row is removed from the database, that is, the node becomes unknown.
    • Method Detail

      • values

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

        public static Status 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
      • getCode

        public int getCode()
        Gets the code that is used for storing the status.
        Returns:
        The code that is used for storing the status. This will never be null.
      • valueOf

        public static Status valueOf​(int code)
        Gets the status for the corresponding code or null in case there is no corresponding status for the designated code.
        Parameters:
        code - The code that is used for representing a status.
        Returns:
        The status the designated code represents or null in case there is no corresponding status.