Enum Class ConnectionMode

java.lang.Object
java.lang.Enum<ConnectionMode>
com.streambase.liveview.client.ConnectionMode
All Implemented Interfaces:
Serializable, Comparable<ConnectionMode>, Constable

public enum ConnectionMode extends Enum<ConnectionMode>
Used when creating a MultiConnectionConfig to define how it will connect to the servers.
Since:
2.0
  • Enum Constant Details

    • SINGLE_CONNECTION_ROUND_ROBIN

      public static final ConnectionMode SINGLE_CONNECTION_ROUND_ROBIN
      Only one server will be connected at a time, and will be considered 'current' If it fails, the next will be tried. then the next, etc. If 'current' goes down, it will cause a roughFailover notification.
    • SINGLE_CONNECT_RETURN_TO_PREFERRED

      public static final ConnectionMode SINGLE_CONNECT_RETURN_TO_PREFERRED
      Only one server will be connected at a time, and will be considered 'current' If it fails, the next will be tried. When any server other than the preferred server (the first in the list) is 'current', a background thread will attempt to reconnect to the preferred server, and 'current' will switch back to that one if it becomes available (causing a smoothFailover notification). If 'current' goes down, it will cause a roughFailover notification.
    • SIMULTANEOUS_CONNECT_SINGLE_ACTIVE

      public static final ConnectionMode SIMULTANEOUS_CONNECT_SINGLE_ACTIVE
      On startup, attempt to connect to all servers, first one to connect becomes 'current' and all others remain warm. Only a single connection will be active (the 'current' server), which means all queries will go to it. Constant attempts will be made to reconnect to any server that is not currently connected (unless they are specifically set to inactive through the API). If 'current' goes down and any others are connected, then one of the others will become 'current' and a smoothFailover notification will be given. If 'current' goes down and not others are connected, then a roughFailover notification will be given This is the default value if the ConnectionMode is not specified.
    • SIMULTANEOUS_CONNECT_SINGLE_ACTIVE_RETURN_TO_PREFERRED

      public static final ConnectionMode SIMULTANEOUS_CONNECT_SINGLE_ACTIVE_RETURN_TO_PREFERRED
      On startup, attempt to connect to all servers, first one to connect becomes 'current' and all others remain warm. Only a single connection will be active (the 'current' server), which means all queries will go to it. Constant attempts will be made to reconnect to any server that is not currently connected (unless they are specifically set to inactive through the API). If 'current' goes down and any others are connected, then one of the others will become 'current' and a smoothFailover notification will be given. If 'current' goes down and not others are connected, then a roughFailover notification will be given If preferred server connects, it is always made 'current' and a smoothFailover to it occurs
    • SIMULTANEOUS_CONNECT_MULTIPLE_ACTIVE

      public static final ConnectionMode SIMULTANEOUS_CONNECT_MULTIPLE_ACTIVE
      On startup, attempt to connect to all servers, all that connect will be considered active. Queries will be assigned to all active connections in a round robin. Constant attempts will be made to reconnect to any server that is not currently connected (unless they are specifically set to inactive through the API). If any server goes down, its queries will be reassigned to other active servers (assuming at least one other is active). This will cause a smoothFailover notification. If the last active server goes down, it will cause a roughFailover notification.
  • Method Details

    • values

      public static ConnectionMode[] 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 ConnectionMode 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