Package io.grpc.lb.v1

Class Server.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<Server.Builder>
com.google.protobuf.GeneratedMessage.Builder<Server.Builder>
io.grpc.lb.v1.Server.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ServerOrBuilder, Cloneable
Enclosing class:
Server

public static final class Server.Builder extends com.google.protobuf.GeneratedMessage.Builder<Server.Builder> implements ServerOrBuilder
 Contains server information. When the drop field is not true, use the other
 fields.
 
Protobuf type grpc.lb.v1.Server
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
     
    private boolean
     
    private com.google.protobuf.ByteString
     
    private Object
     
    private int
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
    private
    Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    private void
     
     
    Indicates whether this particular request should be dropped by the client.
    A resolved address for the server, serialized in network-byte-order.
    An opaque but printable token for load reporting.
    A resolved port number for the server.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    boolean
    Indicates whether this particular request should be dropped by the client.
    com.google.protobuf.ByteString
    A resolved address for the server, serialized in network-byte-order.
    An opaque but printable token for load reporting.
    com.google.protobuf.ByteString
    An opaque but printable token for load reporting.
    int
    A resolved port number for the server.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
     
    setDrop(boolean value)
    Indicates whether this particular request should be dropped by the client.
    setIpAddress(com.google.protobuf.ByteString value)
    A resolved address for the server, serialized in network-byte-order.
    An opaque but printable token for load reporting.
    setLoadBalanceTokenBytes(com.google.protobuf.ByteString value)
    An opaque but printable token for load reporting.
    setPort(int value)
    A resolved port number for the server.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

    • bitField0_

      private int bitField0_
    • ipAddress_

      private com.google.protobuf.ByteString ipAddress_
    • port_

      private int port_
    • loadBalanceToken_

      private Object loadBalanceToken_
    • drop_

      private boolean drop_
  • Constructor Details

    • Builder

      private Builder()
    • Builder

      private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
  • Method Details

    • getDescriptor

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

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

      public Server.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.GeneratedMessage.Builder<Server.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.GeneratedMessage.Builder<Server.Builder>
    • getDefaultInstanceForType

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

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

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

      private void buildPartial0(Server result)
    • mergeFrom

      public Server.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<Server.Builder>
    • mergeFrom

      public Server.Builder mergeFrom(Server other)
    • isInitialized

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

      public Server.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<Server.Builder>
      Throws:
      IOException
    • getIpAddress

      public com.google.protobuf.ByteString getIpAddress()
       A resolved address for the server, serialized in network-byte-order. It may
       either be an IPv4 or IPv6 address.
       
      bytes ip_address = 1;
      Specified by:
      getIpAddress in interface ServerOrBuilder
      Returns:
      The ipAddress.
    • setIpAddress

      public Server.Builder setIpAddress(com.google.protobuf.ByteString value)
       A resolved address for the server, serialized in network-byte-order. It may
       either be an IPv4 or IPv6 address.
       
      bytes ip_address = 1;
      Parameters:
      value - The ipAddress to set.
      Returns:
      This builder for chaining.
    • clearIpAddress

      public Server.Builder clearIpAddress()
       A resolved address for the server, serialized in network-byte-order. It may
       either be an IPv4 or IPv6 address.
       
      bytes ip_address = 1;
      Returns:
      This builder for chaining.
    • getPort

      public int getPort()
       A resolved port number for the server.
       
      int32 port = 2;
      Specified by:
      getPort in interface ServerOrBuilder
      Returns:
      The port.
    • setPort

      public Server.Builder setPort(int value)
       A resolved port number for the server.
       
      int32 port = 2;
      Parameters:
      value - The port to set.
      Returns:
      This builder for chaining.
    • clearPort

      public Server.Builder clearPort()
       A resolved port number for the server.
       
      int32 port = 2;
      Returns:
      This builder for chaining.
    • getLoadBalanceToken

      public String getLoadBalanceToken()
       An opaque but printable token for load reporting. The client must include
       the token of the picked server into the initial metadata when it starts a
       call to that server. The token is used by the server to verify the request
       and to allow the server to report load to the gRPC LB system. The token is
       also used in client stats for reporting dropped calls.
      
       Its length can be variable but must be less than 50 bytes.
       
      string load_balance_token = 3;
      Specified by:
      getLoadBalanceToken in interface ServerOrBuilder
      Returns:
      The loadBalanceToken.
    • getLoadBalanceTokenBytes

      public com.google.protobuf.ByteString getLoadBalanceTokenBytes()
       An opaque but printable token for load reporting. The client must include
       the token of the picked server into the initial metadata when it starts a
       call to that server. The token is used by the server to verify the request
       and to allow the server to report load to the gRPC LB system. The token is
       also used in client stats for reporting dropped calls.
      
       Its length can be variable but must be less than 50 bytes.
       
      string load_balance_token = 3;
      Specified by:
      getLoadBalanceTokenBytes in interface ServerOrBuilder
      Returns:
      The bytes for loadBalanceToken.
    • setLoadBalanceToken

      public Server.Builder setLoadBalanceToken(String value)
       An opaque but printable token for load reporting. The client must include
       the token of the picked server into the initial metadata when it starts a
       call to that server. The token is used by the server to verify the request
       and to allow the server to report load to the gRPC LB system. The token is
       also used in client stats for reporting dropped calls.
      
       Its length can be variable but must be less than 50 bytes.
       
      string load_balance_token = 3;
      Parameters:
      value - The loadBalanceToken to set.
      Returns:
      This builder for chaining.
    • clearLoadBalanceToken

      public Server.Builder clearLoadBalanceToken()
       An opaque but printable token for load reporting. The client must include
       the token of the picked server into the initial metadata when it starts a
       call to that server. The token is used by the server to verify the request
       and to allow the server to report load to the gRPC LB system. The token is
       also used in client stats for reporting dropped calls.
      
       Its length can be variable but must be less than 50 bytes.
       
      string load_balance_token = 3;
      Returns:
      This builder for chaining.
    • setLoadBalanceTokenBytes

      public Server.Builder setLoadBalanceTokenBytes(com.google.protobuf.ByteString value)
       An opaque but printable token for load reporting. The client must include
       the token of the picked server into the initial metadata when it starts a
       call to that server. The token is used by the server to verify the request
       and to allow the server to report load to the gRPC LB system. The token is
       also used in client stats for reporting dropped calls.
      
       Its length can be variable but must be less than 50 bytes.
       
      string load_balance_token = 3;
      Parameters:
      value - The bytes for loadBalanceToken to set.
      Returns:
      This builder for chaining.
    • getDrop

      public boolean getDrop()
       Indicates whether this particular request should be dropped by the client.
       If the request is dropped, there will be a corresponding entry in
       ClientStats.calls_finished_with_drop.
       
      bool drop = 4;
      Specified by:
      getDrop in interface ServerOrBuilder
      Returns:
      The drop.
    • setDrop

      public Server.Builder setDrop(boolean value)
       Indicates whether this particular request should be dropped by the client.
       If the request is dropped, there will be a corresponding entry in
       ClientStats.calls_finished_with_drop.
       
      bool drop = 4;
      Parameters:
      value - The drop to set.
      Returns:
      This builder for chaining.
    • clearDrop

      public Server.Builder clearDrop()
       Indicates whether this particular request should be dropped by the client.
       If the request is dropped, there will be a corresponding entry in
       ClientStats.calls_finished_with_drop.
       
      bool drop = 4;
      Returns:
      This builder for chaining.