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,Serializable,Comparable<LeastRequest.SelectionMethod>
- Enclosing class:
LeastRequest
public static enum LeastRequest.SelectionMethod
extends 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 enum
envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.SelectionMethod-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReturn host with fewest requests from all hosts.Return host with fewest requests from a set of ``choice_count`` randomly selected hosts. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intReturn host with fewest requests from all hosts.private static final com.google.protobuf.Internal.EnumLiteMap<LeastRequest.SelectionMethod> static final intReturn host with fewest requests from a set of ``choice_count`` randomly selected hosts.private final intprivate static final LeastRequest.SelectionMethod[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LeastRequest.SelectionMethodforNumber(int value) static final com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<LeastRequest.SelectionMethod> static LeastRequest.SelectionMethodvalueOf(int value) Deprecated.static LeastRequest.SelectionMethodvalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name.static LeastRequest.SelectionMethodReturns 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 Details
-
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
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
-
-
Field Details
-
N_CHOICES_VALUE
public static final int N_CHOICES_VALUEReturn host with fewest requests from a set of ``choice_count`` randomly selected hosts. Best selection method for most scenarios.
N_CHOICES = 0;- See Also:
-
FULL_SCAN_VALUE
public static final int FULL_SCAN_VALUEReturn 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:
-
internalValueMap
private static final com.google.protobuf.Internal.EnumLiteMap<LeastRequest.SelectionMethod> internalValueMap -
VALUES
-
value
private final int value
-
-
Constructor Details
-
SelectionMethod
private SelectionMethod(int value)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forNumber
- 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:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein 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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-