Enum LeastRequest.SelectionMethod
- java.lang.Object
-
- java.lang.Enum<LeastRequest.SelectionMethod>
-
- io.envoyproxy.envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.SelectionMethod
-
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite
,com.google.protobuf.ProtocolMessageEnum
,java.io.Serializable
,java.lang.Comparable<LeastRequest.SelectionMethod>
- Enclosing class:
- LeastRequest
public static enum LeastRequest.SelectionMethod extends java.lang.Enum<LeastRequest.SelectionMethod> implements com.google.protobuf.ProtocolMessageEnum
Available methods for selecting the host set from which to return the host with the fewest active requests.
Protobuf enumenvoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.SelectionMethod
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FULL_SCAN
Return host with fewest requests from all hosts.N_CHOICES
Return host with fewest requests from a set of ``choice_count`` randomly selected hosts.UNRECOGNIZED
-
Field Summary
Fields Modifier and Type Field Description static int
FULL_SCAN_VALUE
Return host with fewest requests from all hosts.private static com.google.protobuf.Internal.EnumLiteMap<LeastRequest.SelectionMethod>
internalValueMap
static int
N_CHOICES_VALUE
Return host with fewest requests from a set of ``choice_count`` randomly selected hosts.private int
value
private static LeastRequest.SelectionMethod[]
VALUES
-
Constructor Summary
Constructors Modifier Constructor Description private
SelectionMethod(int value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static LeastRequest.SelectionMethod
forNumber(int value)
static com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor()
com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType()
int
getNumber()
com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor()
static com.google.protobuf.Internal.EnumLiteMap<LeastRequest.SelectionMethod>
internalGetValueMap()
static LeastRequest.SelectionMethod
valueOf(int value)
Deprecated.static LeastRequest.SelectionMethod
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Returns the enum constant of this type with the specified name.static LeastRequest.SelectionMethod
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static LeastRequest.SelectionMethod[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
N_CHOICES
public static final LeastRequest.SelectionMethod N_CHOICES
Return host with fewest requests from a set of ``choice_count`` randomly selected hosts. Best selection method for most scenarios.
N_CHOICES = 0;
-
FULL_SCAN
public static final LeastRequest.SelectionMethod FULL_SCAN
Return host with fewest requests from all hosts. Useful in some niche use cases involving low request rates and one of: (example 1) low request limits on workloads, or (example 2) few hosts. Example 1: Consider a workload type that can only accept one connection at a time. If such workloads are deployed across many hosts, only a small percentage of those workloads have zero connections at any given time, and the rate of new connections is low, the ``FULL_SCAN`` method is more likely to select a suitable host than ``N_CHOICES``. Example 2: Consider a workload type that is only deployed on 2 hosts. With default settings, the ``N_CHOICES`` method will return the host with more active requests 25% of the time. If the request rate is sufficiently low, the behavior of always selecting the host with least requests as of the last metrics refresh may be preferable.
FULL_SCAN = 1;
-
UNRECOGNIZED
public static final LeastRequest.SelectionMethod UNRECOGNIZED
-
-
Field Detail
-
N_CHOICES_VALUE
public static final int N_CHOICES_VALUE
Return host with fewest requests from a set of ``choice_count`` randomly selected hosts. Best selection method for most scenarios.
N_CHOICES = 0;
- See Also:
- Constant Field Values
-
FULL_SCAN_VALUE
public static final int FULL_SCAN_VALUE
Return host with fewest requests from all hosts. Useful in some niche use cases involving low request rates and one of: (example 1) low request limits on workloads, or (example 2) few hosts. Example 1: Consider a workload type that can only accept one connection at a time. If such workloads are deployed across many hosts, only a small percentage of those workloads have zero connections at any given time, and the rate of new connections is low, the ``FULL_SCAN`` method is more likely to select a suitable host than ``N_CHOICES``. Example 2: Consider a workload type that is only deployed on 2 hosts. With default settings, the ``N_CHOICES`` method will return the host with more active requests 25% of the time. If the request rate is sufficiently low, the behavior of always selecting the host with least requests as of the last metrics refresh may be preferable.
FULL_SCAN = 1;
- See Also:
- Constant Field Values
-
internalValueMap
private static final com.google.protobuf.Internal.EnumLiteMap<LeastRequest.SelectionMethod> internalValueMap
-
VALUES
private static final LeastRequest.SelectionMethod[] VALUES
-
value
private final int value
-
-
Method Detail
-
values
public static LeastRequest.SelectionMethod[] 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 (LeastRequest.SelectionMethod c : LeastRequest.SelectionMethod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LeastRequest.SelectionMethod 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 namejava.lang.NullPointerException
- if the argument is null
-
getNumber
public final int getNumber()
- Specified by:
getNumber
in interfacecom.google.protobuf.Internal.EnumLite
- Specified by:
getNumber
in interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
@Deprecated public static LeastRequest.SelectionMethod valueOf(int value)
Deprecated.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:
value
- 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 namejava.lang.NullPointerException
- if the argument is null
-
forNumber
public static LeastRequest.SelectionMethod forNumber(int value)
- Parameters:
value
- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<LeastRequest.SelectionMethod> internalGetValueMap()
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
- Specified by:
getValueDescriptor
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
-
valueOf
public static LeastRequest.SelectionMethod valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
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:
desc
- 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 namejava.lang.NullPointerException
- if the argument is null
-
-