Package io.grpc.serviceconfig
Enum ServiceConfig.LoadBalancingPolicy
java.lang.Object
java.lang.Enum<ServiceConfig.LoadBalancingPolicy>
io.grpc.serviceconfig.ServiceConfig.LoadBalancingPolicy
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<ServiceConfig.LoadBalancingPolicy>
- Enclosing class:
- ServiceConfig
public static enum ServiceConfig.LoadBalancingPolicy
extends Enum<ServiceConfig.LoadBalancingPolicy>
implements com.google.protobuf.ProtocolMessageEnum
Load balancing policy. Note that load_balancing_policy is deprecated in favor of load_balancing_config; the former will be used only if the latter is unset. If no LB policy is configured here, then the default is pick_first. If the policy name is set via the client API, that value overrides the value specified here. If the deprecated load_balancing_policy field is used, note that if the resolver returns at least one balancer address (as opposed to backend addresses), gRPC will use grpclb (see https://github.com/grpc/grpc/blob/master/doc/load-balancing.md), regardless of what policy is configured here. However, if the resolver returns at least one backend address in addition to the balancer address(es), the client may fall back to the requested policy if it is unable to reach any of the grpclb load balancers.Protobuf enum
grpc.service_config.ServiceConfig.LoadBalancingPolicy-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intROUND_ROBIN = 1;static final intUNSPECIFIED = 0; -
Method Summary
Modifier and TypeMethodDescriptionforNumber(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<ServiceConfig.LoadBalancingPolicy>valueOf(int value) Deprecated.valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name.Returns the enum constant of this type with the specified name.static ServiceConfig.LoadBalancingPolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UNSPECIFIED
UNSPECIFIED = 0; -
ROUND_ROBIN
ROUND_ROBIN = 1; -
UNRECOGNIZED
-
-
Field Details
-
UNSPECIFIED_VALUE
public static final int UNSPECIFIED_VALUEUNSPECIFIED = 0;- See Also:
-
ROUND_ROBIN_VALUE
public static final int ROUND_ROBIN_VALUEROUND_ROBIN = 1;- See Also:
-
-
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<ServiceConfig.LoadBalancingPolicy> 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 ServiceConfig.LoadBalancingPolicy 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
-