Enum Class Status

java.lang.Object
java.lang.Enum<Status>
de.aristaflow.adept2.model.cluster.Status
All Implemented Interfaces:
Serializable, Comparable<Status>, java.lang.constant.Constable

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.
  • 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
    AristaFlow is running as client on its node and it is connected to the AristaFlow-server.
    The status of the server is doubtful, that is, the server seems to be lost but it is given additional time to recover.
    The AristaFlow server has not sent alive signals and is therefore considered lost.
    AristaFlow is running as client on its node but it has lost connection to the AristaFlow-server.
    AristaFlow has been running as client on its node and it is now restarting.
    The AristaFlow server is restarting on its node.
    AristaFlow is running as server on its node.
    AristaFlow is starting on its node.
    AristaFlow is starting as client on its node.
    AristaFlow is starting as server on its node.
    AristaFlow has terminated on its node.
    AristaFlow has been running as client on its node and it is now terminating.
    The AristaFlow server is terminating on its node.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the code that is used for storing the status.
    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.
    static Status
    Returns the enum constant of this class with the specified name.
    static Status[]
    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

    • 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 Details

    • values

      public static Status[] 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 Status 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
    • 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.