Class GrpcLbConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder>
io.grpc.serviceconfig.GrpcLbConfig.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, GrpcLbConfigOrBuilder, Cloneable
Enclosing class:
GrpcLbConfig

public static final class GrpcLbConfig.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder> implements GrpcLbConfigOrBuilder
 Configuration for grpclb LB policy.
 
Protobuf type grpc.service_config.GrpcLbConfig
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder>
    • clear

      public GrpcLbConfig.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder>
    • getDefaultInstanceForType

      public GrpcLbConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public GrpcLbConfig build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public GrpcLbConfig buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public GrpcLbConfig.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder>
    • setField

      public GrpcLbConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder>
    • clearField

      public GrpcLbConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder>
    • clearOneof

      public GrpcLbConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder>
    • setRepeatedField

      public GrpcLbConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder>
    • addRepeatedField

      public GrpcLbConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder>
    • mergeFrom

      public GrpcLbConfig.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<GrpcLbConfig.Builder>
    • mergeFrom

      public GrpcLbConfig.Builder mergeFrom(GrpcLbConfig other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder>
    • mergeFrom

      public GrpcLbConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<GrpcLbConfig.Builder>
      Throws:
      IOException
    • getChildPolicyList

      public List<LoadBalancingConfig> getChildPolicyList()
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
      Specified by:
      getChildPolicyList in interface GrpcLbConfigOrBuilder
    • getChildPolicyCount

      public int getChildPolicyCount()
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
      Specified by:
      getChildPolicyCount in interface GrpcLbConfigOrBuilder
    • getChildPolicy

      public LoadBalancingConfig getChildPolicy(int index)
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
      Specified by:
      getChildPolicy in interface GrpcLbConfigOrBuilder
    • setChildPolicy

      public GrpcLbConfig.Builder setChildPolicy(int index, LoadBalancingConfig value)
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
    • setChildPolicy

      public GrpcLbConfig.Builder setChildPolicy(int index, LoadBalancingConfig.Builder builderForValue)
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
    • addChildPolicy

      public GrpcLbConfig.Builder addChildPolicy(LoadBalancingConfig value)
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
    • addChildPolicy

      public GrpcLbConfig.Builder addChildPolicy(int index, LoadBalancingConfig value)
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
    • addChildPolicy

      public GrpcLbConfig.Builder addChildPolicy(LoadBalancingConfig.Builder builderForValue)
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
    • addChildPolicy

      public GrpcLbConfig.Builder addChildPolicy(int index, LoadBalancingConfig.Builder builderForValue)
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
    • addAllChildPolicy

      public GrpcLbConfig.Builder addAllChildPolicy(Iterable<? extends LoadBalancingConfig> values)
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
    • clearChildPolicy

      public GrpcLbConfig.Builder clearChildPolicy()
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
    • removeChildPolicy

      public GrpcLbConfig.Builder removeChildPolicy(int index)
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
    • getChildPolicyBuilder

      public LoadBalancingConfig.Builder getChildPolicyBuilder(int index)
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
    • getChildPolicyOrBuilder

      public LoadBalancingConfigOrBuilder getChildPolicyOrBuilder(int index)
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
      Specified by:
      getChildPolicyOrBuilder in interface GrpcLbConfigOrBuilder
    • getChildPolicyOrBuilderList

      public List<? extends LoadBalancingConfigOrBuilder> getChildPolicyOrBuilderList()
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
      Specified by:
      getChildPolicyOrBuilderList in interface GrpcLbConfigOrBuilder
    • addChildPolicyBuilder

      public LoadBalancingConfig.Builder addChildPolicyBuilder()
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
    • addChildPolicyBuilder

      public LoadBalancingConfig.Builder addChildPolicyBuilder(int index)
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
    • getChildPolicyBuilderList

      public List<LoadBalancingConfig.Builder> getChildPolicyBuilderList()
       Optional.  What LB policy to use for routing between the backend
       addresses.  If unset, defaults to round_robin.
       Currently, the only supported values are round_robin and pick_first.
       Note that this will be used both in balancer mode and in fallback mode.
       Multiple LB policies can be specified; clients will iterate through
       the list in order and stop at the first policy that they support.
       
      repeated .grpc.service_config.LoadBalancingConfig child_policy = 1;
    • getServiceName

      public String getServiceName()
       Optional.  If specified, overrides the name of the service to be sent to
       the balancer.
       
      string service_name = 2;
      Specified by:
      getServiceName in interface GrpcLbConfigOrBuilder
      Returns:
      The serviceName.
    • getServiceNameBytes

      public com.google.protobuf.ByteString getServiceNameBytes()
       Optional.  If specified, overrides the name of the service to be sent to
       the balancer.
       
      string service_name = 2;
      Specified by:
      getServiceNameBytes in interface GrpcLbConfigOrBuilder
      Returns:
      The bytes for serviceName.
    • setServiceName

      public GrpcLbConfig.Builder setServiceName(String value)
       Optional.  If specified, overrides the name of the service to be sent to
       the balancer.
       
      string service_name = 2;
      Parameters:
      value - The serviceName to set.
      Returns:
      This builder for chaining.
    • clearServiceName

      public GrpcLbConfig.Builder clearServiceName()
       Optional.  If specified, overrides the name of the service to be sent to
       the balancer.
       
      string service_name = 2;
      Returns:
      This builder for chaining.
    • setServiceNameBytes

      public GrpcLbConfig.Builder setServiceNameBytes(com.google.protobuf.ByteString value)
       Optional.  If specified, overrides the name of the service to be sent to
       the balancer.
       
      string service_name = 2;
      Parameters:
      value - The bytes for serviceName to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final GrpcLbConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder>
    • mergeUnknownFields

      public final GrpcLbConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<GrpcLbConfig.Builder>