Enum SimpleLB

    • Enum Constant Detail

      • ROUND_ROBIN

        public static final SimpleLB ROUND_ROBIN
        Round Robin policy. Default
      • LEAST_CONN

        public static final SimpleLB LEAST_CONN
        The least request load balancer uses an O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
      • RANDOM

        public static final SimpleLB RANDOM
        The random load balancer selects a random healthy host. The random load balancer generally performs better than round robin if no health checking policy is configured.
      • PASSTHROUGH

        public static final SimpleLB PASSTHROUGH
        This option will forward the connection to the original IP address requested by the caller without doing any form of load balancing. This option must be used with care. It is meant for advanced use cases. Refer to Original Destination load balancer in Envoy for further details.
    • Method Detail

      • values

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

        public static SimpleLB 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
      • value

        public int value()