Package io.grpc.lb.v1
Class Server.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Server.Builder>
-
- io.grpc.lb.v1.Server.Builder
-
- All Implemented Interfaces:
Message.Builder
,MessageLite.Builder
,MessageLiteOrBuilder
,MessageOrBuilder
,ServerOrBuilder
,Cloneable
- Enclosing class:
- Server
public static final class Server.Builder extends GeneratedMessageV3.Builder<Server.Builder> implements ServerOrBuilder
Contains server information. When the drop field is not true, use the other fields.
Protobuf typegrpc.lb.v1.Server
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Server.Builder
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Server
build()
Server
buildPartial()
Server.Builder
clear()
Server.Builder
clearDrop()
Indicates whether this particular request should be dropped by the client.Server.Builder
clearField(Descriptors.FieldDescriptor field)
Server.Builder
clearIpAddress()
A resolved address for the server, serialized in network-byte-order.Server.Builder
clearLoadBalanceToken()
An opaque but printable token for load reporting.Server.Builder
clearOneof(Descriptors.OneofDescriptor oneof)
Server.Builder
clearPort()
A resolved port number for the server.Server.Builder
clone()
Server
getDefaultInstanceForType()
static Descriptors.Descriptor
getDescriptor()
Descriptors.Descriptor
getDescriptorForType()
boolean
getDrop()
Indicates whether this particular request should be dropped by the client.ByteString
getIpAddress()
A resolved address for the server, serialized in network-byte-order.String
getLoadBalanceToken()
An opaque but printable token for load reporting.ByteString
getLoadBalanceTokenBytes()
An opaque but printable token for load reporting.int
getPort()
A resolved port number for the server.protected GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
Server.Builder
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Server.Builder
mergeFrom(Message other)
Server.Builder
mergeFrom(Server other)
Server.Builder
mergeUnknownFields(UnknownFieldSet unknownFields)
Server.Builder
setDrop(boolean value)
Indicates whether this particular request should be dropped by the client.Server.Builder
setField(Descriptors.FieldDescriptor field, Object value)
Server.Builder
setIpAddress(ByteString value)
A resolved address for the server, serialized in network-byte-order.Server.Builder
setLoadBalanceToken(String value)
An opaque but printable token for load reporting.Server.Builder
setLoadBalanceTokenBytes(ByteString value)
An opaque but printable token for load reporting.Server.Builder
setPort(int value)
A resolved port number for the server.Server.Builder
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Server.Builder
setUnknownFields(UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, 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
-
-
-
-
Method Detail
-
getDescriptor
public static final Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classGeneratedMessageV3.Builder<Server.Builder>
-
clear
public Server.Builder clear()
- Specified by:
clear
in interfaceMessage.Builder
- Specified by:
clear
in interfaceMessageLite.Builder
- Overrides:
clear
in classGeneratedMessageV3.Builder<Server.Builder>
-
getDescriptorForType
public Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfaceMessage.Builder
- Specified by:
getDescriptorForType
in interfaceMessageOrBuilder
- Overrides:
getDescriptorForType
in classGeneratedMessageV3.Builder<Server.Builder>
-
getDefaultInstanceForType
public Server getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfaceMessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfaceMessageOrBuilder
-
build
public Server build()
- Specified by:
build
in interfaceMessage.Builder
- Specified by:
build
in interfaceMessageLite.Builder
-
buildPartial
public Server buildPartial()
- Specified by:
buildPartial
in interfaceMessage.Builder
- Specified by:
buildPartial
in interfaceMessageLite.Builder
-
clone
public Server.Builder clone()
- Specified by:
clone
in interfaceMessage.Builder
- Specified by:
clone
in interfaceMessageLite.Builder
- Overrides:
clone
in classGeneratedMessageV3.Builder<Server.Builder>
-
setField
public Server.Builder setField(Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfaceMessage.Builder
- Overrides:
setField
in classGeneratedMessageV3.Builder<Server.Builder>
-
clearField
public Server.Builder clearField(Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfaceMessage.Builder
- Overrides:
clearField
in classGeneratedMessageV3.Builder<Server.Builder>
-
clearOneof
public Server.Builder clearOneof(Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfaceMessage.Builder
- Overrides:
clearOneof
in classGeneratedMessageV3.Builder<Server.Builder>
-
setRepeatedField
public Server.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfaceMessage.Builder
- Overrides:
setRepeatedField
in classGeneratedMessageV3.Builder<Server.Builder>
-
addRepeatedField
public Server.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfaceMessage.Builder
- Overrides:
addRepeatedField
in classGeneratedMessageV3.Builder<Server.Builder>
-
mergeFrom
public Server.Builder mergeFrom(Message other)
- Specified by:
mergeFrom
in interfaceMessage.Builder
- Overrides:
mergeFrom
in classAbstractMessage.Builder<Server.Builder>
-
mergeFrom
public Server.Builder mergeFrom(Server other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfaceMessageLiteOrBuilder
- Overrides:
isInitialized
in classGeneratedMessageV3.Builder<Server.Builder>
-
mergeFrom
public Server.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfaceMessage.Builder
- Specified by:
mergeFrom
in interfaceMessageLite.Builder
- Overrides:
mergeFrom
in classAbstractMessage.Builder<Server.Builder>
- Throws:
IOException
-
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 interfaceServerOrBuilder
- 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 interfaceServerOrBuilder
- 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 interfaceServerOrBuilder
- 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 interfaceServerOrBuilder
- 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(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 interfaceServerOrBuilder
- 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.
-
setUnknownFields
public final Server.Builder setUnknownFields(UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfaceMessage.Builder
- Overrides:
setUnknownFields
in classGeneratedMessageV3.Builder<Server.Builder>
-
mergeUnknownFields
public final Server.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfaceMessage.Builder
- Overrides:
mergeUnknownFields
in classGeneratedMessageV3.Builder<Server.Builder>
-
-