Enum NodeDiscoveryMode

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

    public enum NodeDiscoveryMode
    extends java.lang.Enum<NodeDiscoveryMode>
    Controls how the client discovers node roles and topology in standalone mode.
    • STANDARD - Default: verify node roles via INFO REPLICATION, use only provided addresses.
    • STATIC - Skip role detection entirely. Trust provided addresses as-is; first address is primary. Use when connecting through a proxy (e.g., Envoy) or when the topology is known and static.
    • DISCOVER_ALL - Discover full topology (primary + all replicas) from any starting node. Provide any single node address and the client will find and connect to all other nodes.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DISCOVER_ALL
      Discover full topology (primary + all replicas) from any starting node.
      STANDARD
      Default: verify node roles via INFO REPLICATION, use only provided addresses.
      STATIC
      Skip role detection entirely.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static NodeDiscoveryMode valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static NodeDiscoveryMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • STANDARD

        public static final NodeDiscoveryMode STANDARD
        Default: verify node roles via INFO REPLICATION, use only provided addresses.
      • STATIC

        public static final NodeDiscoveryMode STATIC
        Skip role detection entirely. Trust provided addresses as-is; first address is primary. Use when connecting through a proxy (e.g., Envoy) or when the topology is known and static.

        Note: Do not set clientName when using this mode with a proxy.

      • DISCOVER_ALL

        public static final NodeDiscoveryMode DISCOVER_ALL
        Discover full topology (primary + all replicas) from any starting node. Provide any single node address and the client will find and connect to all other nodes.
    • Method Detail

      • values

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

        public static NodeDiscoveryMode 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