Enum SimpleLB
- java.lang.Object
-
- java.lang.Enum<SimpleLB>
-
- me.snowdrop.istio.api.networking.v1alpha3.SimpleLB
-
- All Implemented Interfaces:
Serializable,Comparable<SimpleLB>
public enum SimpleLB extends Enum<SimpleLB>
- Author:
- Christophe Laprun
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LEAST_CONNThe least request load balancer uses an O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.PASSTHROUGHThis option will forward the connection to the original IP address requested by the caller without doing any form of load balancing.RANDOMThe random load balancer selects a random healthy host.ROUND_ROBINRound Robin policy.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intvalue()static SimpleLBvalueOf(String name)Returns the enum constant of this type with the specified name.static SimpleLB[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 nameNullPointerException- if the argument is null
-
value
public int value()
-
-