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 and Description |
|---|
ROUND_ROBIN
ROUND_ROBIN = 1; |
UNRECOGNIZED |
UNSPECIFIED
UNSPECIFIED = 0; |
| Modifier and Type | Field and Description |
|---|---|
static int |
ROUND_ROBIN_VALUE
ROUND_ROBIN = 1; |
static int |
UNSPECIFIED_VALUE
UNSPECIFIED = 0; |
| Modifier and Type | Method and Description |
|---|---|
static ServiceConfig.LoadBalancingPolicy |
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<ServiceConfig.LoadBalancingPolicy> |
internalGetValueMap() |
static ServiceConfig.LoadBalancingPolicy |
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static ServiceConfig.LoadBalancingPolicy |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
static ServiceConfig.LoadBalancingPolicy |
valueOf(String 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.
|
public static final ServiceConfig.LoadBalancingPolicy UNSPECIFIED
UNSPECIFIED = 0;public static final ServiceConfig.LoadBalancingPolicy ROUND_ROBIN
ROUND_ROBIN = 1;public static final ServiceConfig.LoadBalancingPolicy UNRECOGNIZED
public static final int UNSPECIFIED_VALUE
UNSPECIFIED = 0;public static final int ROUND_ROBIN_VALUE
ROUND_ROBIN = 1;public static ServiceConfig.LoadBalancingPolicy[] values()
for (ServiceConfig.LoadBalancingPolicy c : ServiceConfig.LoadBalancingPolicy.values()) System.out.println(c);
public static ServiceConfig.LoadBalancingPolicy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final int getNumber()
getNumber in interface com.google.protobuf.Internal.EnumLitegetNumber in interface com.google.protobuf.ProtocolMessageEnum@Deprecated public static ServiceConfig.LoadBalancingPolicy valueOf(int value)
forNumber(int) instead.value - The numeric wire value of the corresponding enum entry.public static ServiceConfig.LoadBalancingPolicy forNumber(int value)
value - The numeric wire value of the corresponding enum entry.public static com.google.protobuf.Internal.EnumLiteMap<ServiceConfig.LoadBalancingPolicy> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnumpublic final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnumpublic static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static ServiceConfig.LoadBalancingPolicy valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2022 Google LLC. All rights reserved.