Enum Class RoutingMode

java.lang.Object
java.lang.Enum<RoutingMode>
com.hazelcast.client.config.RoutingMode
All Implemented Interfaces:
Serializable, Comparable<RoutingMode>, Constable

public enum RoutingMode extends Enum<RoutingMode>

Clients can connect to cluster members in one of 3 modes:

  • SINGLE_MEMBER: Client only connects to a single member
  • ALL_MEMBERS: Client connects to all cluster members
  • MULTI_MEMBER: Client only connects to a subset of members based on RoutingStrategy.

The UNKNOWN enumeration represents a state where the client's RoutingMode is not known, due to < 5.5 client versions

Since:
5.5.3
  • Enum Constant Details

    • SINGLE_MEMBER

      public static final RoutingMode SINGLE_MEMBER
      Represents a single member routing mode, previously known as `UNISOCKET`.
    • ALL_MEMBERS

      public static final RoutingMode ALL_MEMBERS
      Represents an all members routing mode, previously known as `SMART`.
    • MULTI_MEMBER

      public static final RoutingMode MULTI_MEMBER
      Represents a multi member routing mode that does not connect to all members, previously known as `SUBSET`.
    • UNKNOWN

      public static final RoutingMode UNKNOWN
      Represents an unknown routing mode, due to < 5.5 client versions Note: This mode should never be configured as a RoutingMode
  • Method Details

    • values

      public static RoutingMode[] 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 RoutingMode 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
    • getId

      public int getId()
    • isKnown

      public boolean isKnown()
      Returns whether this RoutingMode is a concrete enumeration representing a real routing mode, or if it's a placeholder for an unknown value that could not be parsed.
      Returns:
      true if this RoutingMode is a real mode, or false otherwise
    • getById

      public static RoutingMode getById(int id)