Package io.grpc.lb.v1

Class Server.Builder

    • Method Detail

      • getIpAddress

        public 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​(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 java.lang.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 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​(java.lang.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​(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.