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 Details

  • Field Details

    • UNSPECIFIED_VALUE

      public static final int UNSPECIFIED_VALUE
      UNSPECIFIED = 0;
      See Also:
    • ROUND_ROBIN_VALUE

      public static final int ROUND_ROBIN_VALUE
      ROUND_ROBIN = 1;
      See Also:
  • Method Details

    • values

      public static ServiceConfig.LoadBalancingPolicy[] 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

      public static ServiceConfig.LoadBalancingPolicy 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 name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static ServiceConfig.LoadBalancingPolicy 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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • forNumber

      public static ServiceConfig.LoadBalancingPolicy 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<ServiceConfig.LoadBalancingPolicy> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.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 name
      NullPointerException - if the argument is null