public static final class MethodConfig.HedgingPolicy.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.HedgingPolicy.Builder> implements MethodConfig.HedgingPolicyOrBuilder
The hedging policy for outgoing RPCs. Hedged RPCs may execute more than once on the server, so only idempotent methods should specify a hedging policy.Protobuf type
grpc.service_config.MethodConfig.HedgingPolicy| Modifier and Type | Method and Description |
|---|---|
MethodConfig.HedgingPolicy.Builder |
addAllNonFatalStatusCodes(Iterable<? extends com.google.rpc.Code> values)
The set of status codes which indicate other hedged RPCs may still
succeed.
|
MethodConfig.HedgingPolicy.Builder |
addAllNonFatalStatusCodesValue(Iterable<Integer> values)
The set of status codes which indicate other hedged RPCs may still
succeed.
|
MethodConfig.HedgingPolicy.Builder |
addNonFatalStatusCodes(com.google.rpc.Code value)
The set of status codes which indicate other hedged RPCs may still
succeed.
|
MethodConfig.HedgingPolicy.Builder |
addNonFatalStatusCodesValue(int value)
The set of status codes which indicate other hedged RPCs may still
succeed.
|
MethodConfig.HedgingPolicy.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
MethodConfig.HedgingPolicy |
build() |
MethodConfig.HedgingPolicy |
buildPartial() |
MethodConfig.HedgingPolicy.Builder |
clear() |
MethodConfig.HedgingPolicy.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
MethodConfig.HedgingPolicy.Builder |
clearHedgingDelay()
The first RPC will be sent immediately, but the max_requests-1 subsequent
hedged RPCs will be sent at intervals of every hedging_delay.
|
MethodConfig.HedgingPolicy.Builder |
clearMaxAttempts()
The hedging policy will send up to max_requests RPCs.
|
MethodConfig.HedgingPolicy.Builder |
clearNonFatalStatusCodes()
The set of status codes which indicate other hedged RPCs may still
succeed.
|
MethodConfig.HedgingPolicy.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
MethodConfig.HedgingPolicy.Builder |
clone() |
MethodConfig.HedgingPolicy |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
com.google.protobuf.Duration |
getHedgingDelay()
The first RPC will be sent immediately, but the max_requests-1 subsequent
hedged RPCs will be sent at intervals of every hedging_delay.
|
com.google.protobuf.Duration.Builder |
getHedgingDelayBuilder()
The first RPC will be sent immediately, but the max_requests-1 subsequent
hedged RPCs will be sent at intervals of every hedging_delay.
|
com.google.protobuf.DurationOrBuilder |
getHedgingDelayOrBuilder()
The first RPC will be sent immediately, but the max_requests-1 subsequent
hedged RPCs will be sent at intervals of every hedging_delay.
|
int |
getMaxAttempts()
The hedging policy will send up to max_requests RPCs.
|
com.google.rpc.Code |
getNonFatalStatusCodes(int index)
The set of status codes which indicate other hedged RPCs may still
succeed.
|
int |
getNonFatalStatusCodesCount()
The set of status codes which indicate other hedged RPCs may still
succeed.
|
List<com.google.rpc.Code> |
getNonFatalStatusCodesList()
The set of status codes which indicate other hedged RPCs may still
succeed.
|
int |
getNonFatalStatusCodesValue(int index)
The set of status codes which indicate other hedged RPCs may still
succeed.
|
List<Integer> |
getNonFatalStatusCodesValueList()
The set of status codes which indicate other hedged RPCs may still
succeed.
|
boolean |
hasHedgingDelay()
The first RPC will be sent immediately, but the max_requests-1 subsequent
hedged RPCs will be sent at intervals of every hedging_delay.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
MethodConfig.HedgingPolicy.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
MethodConfig.HedgingPolicy.Builder |
mergeFrom(com.google.protobuf.Message other) |
MethodConfig.HedgingPolicy.Builder |
mergeFrom(MethodConfig.HedgingPolicy other) |
MethodConfig.HedgingPolicy.Builder |
mergeHedgingDelay(com.google.protobuf.Duration value)
The first RPC will be sent immediately, but the max_requests-1 subsequent
hedged RPCs will be sent at intervals of every hedging_delay.
|
MethodConfig.HedgingPolicy.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
MethodConfig.HedgingPolicy.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
MethodConfig.HedgingPolicy.Builder |
setHedgingDelay(com.google.protobuf.Duration.Builder builderForValue)
The first RPC will be sent immediately, but the max_requests-1 subsequent
hedged RPCs will be sent at intervals of every hedging_delay.
|
MethodConfig.HedgingPolicy.Builder |
setHedgingDelay(com.google.protobuf.Duration value)
The first RPC will be sent immediately, but the max_requests-1 subsequent
hedged RPCs will be sent at intervals of every hedging_delay.
|
MethodConfig.HedgingPolicy.Builder |
setMaxAttempts(int value)
The hedging policy will send up to max_requests RPCs.
|
MethodConfig.HedgingPolicy.Builder |
setNonFatalStatusCodes(int index,
com.google.rpc.Code value)
The set of status codes which indicate other hedged RPCs may still
succeed.
|
MethodConfig.HedgingPolicy.Builder |
setNonFatalStatusCodesValue(int index,
int value)
The set of status codes which indicate other hedged RPCs may still
succeed.
|
MethodConfig.HedgingPolicy.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
MethodConfig.HedgingPolicy.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.HedgingPolicy.Builder>public MethodConfig.HedgingPolicy.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.HedgingPolicy.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.HedgingPolicy.Builder>public MethodConfig.HedgingPolicy getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic MethodConfig.HedgingPolicy build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic MethodConfig.HedgingPolicy buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic MethodConfig.HedgingPolicy.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.HedgingPolicy.Builder>public MethodConfig.HedgingPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.HedgingPolicy.Builder>public MethodConfig.HedgingPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.HedgingPolicy.Builder>public MethodConfig.HedgingPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.HedgingPolicy.Builder>public MethodConfig.HedgingPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.HedgingPolicy.Builder>public MethodConfig.HedgingPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.HedgingPolicy.Builder>public MethodConfig.HedgingPolicy.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<MethodConfig.HedgingPolicy.Builder>public MethodConfig.HedgingPolicy.Builder mergeFrom(MethodConfig.HedgingPolicy other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.HedgingPolicy.Builder>public MethodConfig.HedgingPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<MethodConfig.HedgingPolicy.Builder>IOExceptionpublic int getMaxAttempts()
The hedging policy will send up to max_requests RPCs. This number represents the total number of all attempts, including the original attempt. This field is required and must be greater than 1. Any value greater than 5 will be treated as if it were 5.
uint32 max_attempts = 1;getMaxAttempts in interface MethodConfig.HedgingPolicyOrBuilderpublic MethodConfig.HedgingPolicy.Builder setMaxAttempts(int value)
The hedging policy will send up to max_requests RPCs. This number represents the total number of all attempts, including the original attempt. This field is required and must be greater than 1. Any value greater than 5 will be treated as if it were 5.
uint32 max_attempts = 1;value - The maxAttempts to set.public MethodConfig.HedgingPolicy.Builder clearMaxAttempts()
The hedging policy will send up to max_requests RPCs. This number represents the total number of all attempts, including the original attempt. This field is required and must be greater than 1. Any value greater than 5 will be treated as if it were 5.
uint32 max_attempts = 1;public boolean hasHedgingDelay()
The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay. Set this to 0 to immediately send all max_requests RPCs.
.google.protobuf.Duration hedging_delay = 2;hasHedgingDelay in interface MethodConfig.HedgingPolicyOrBuilderpublic com.google.protobuf.Duration getHedgingDelay()
The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay. Set this to 0 to immediately send all max_requests RPCs.
.google.protobuf.Duration hedging_delay = 2;getHedgingDelay in interface MethodConfig.HedgingPolicyOrBuilderpublic MethodConfig.HedgingPolicy.Builder setHedgingDelay(com.google.protobuf.Duration value)
The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay. Set this to 0 to immediately send all max_requests RPCs.
.google.protobuf.Duration hedging_delay = 2;public MethodConfig.HedgingPolicy.Builder setHedgingDelay(com.google.protobuf.Duration.Builder builderForValue)
The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay. Set this to 0 to immediately send all max_requests RPCs.
.google.protobuf.Duration hedging_delay = 2;public MethodConfig.HedgingPolicy.Builder mergeHedgingDelay(com.google.protobuf.Duration value)
The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay. Set this to 0 to immediately send all max_requests RPCs.
.google.protobuf.Duration hedging_delay = 2;public MethodConfig.HedgingPolicy.Builder clearHedgingDelay()
The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay. Set this to 0 to immediately send all max_requests RPCs.
.google.protobuf.Duration hedging_delay = 2;public com.google.protobuf.Duration.Builder getHedgingDelayBuilder()
The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay. Set this to 0 to immediately send all max_requests RPCs.
.google.protobuf.Duration hedging_delay = 2;public com.google.protobuf.DurationOrBuilder getHedgingDelayOrBuilder()
The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay. Set this to 0 to immediately send all max_requests RPCs.
.google.protobuf.Duration hedging_delay = 2;getHedgingDelayOrBuilder in interface MethodConfig.HedgingPolicyOrBuilderpublic List<com.google.rpc.Code> getNonFatalStatusCodesList()
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;getNonFatalStatusCodesList in interface MethodConfig.HedgingPolicyOrBuilderpublic int getNonFatalStatusCodesCount()
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;getNonFatalStatusCodesCount in interface MethodConfig.HedgingPolicyOrBuilderpublic com.google.rpc.Code getNonFatalStatusCodes(int index)
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;getNonFatalStatusCodes in interface MethodConfig.HedgingPolicyOrBuilderindex - The index of the element to return.public MethodConfig.HedgingPolicy.Builder setNonFatalStatusCodes(int index, com.google.rpc.Code value)
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;index - The index to set the value at.value - The nonFatalStatusCodes to set.public MethodConfig.HedgingPolicy.Builder addNonFatalStatusCodes(com.google.rpc.Code value)
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;value - The nonFatalStatusCodes to add.public MethodConfig.HedgingPolicy.Builder addAllNonFatalStatusCodes(Iterable<? extends com.google.rpc.Code> values)
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;values - The nonFatalStatusCodes to add.public MethodConfig.HedgingPolicy.Builder clearNonFatalStatusCodes()
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;public List<Integer> getNonFatalStatusCodesValueList()
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;getNonFatalStatusCodesValueList in interface MethodConfig.HedgingPolicyOrBuilderpublic int getNonFatalStatusCodesValue(int index)
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;getNonFatalStatusCodesValue in interface MethodConfig.HedgingPolicyOrBuilderindex - The index of the value to return.public MethodConfig.HedgingPolicy.Builder setNonFatalStatusCodesValue(int index, int value)
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;index - The index to set the value at.value - The enum numeric value on the wire for nonFatalStatusCodes to set.public MethodConfig.HedgingPolicy.Builder addNonFatalStatusCodesValue(int value)
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;value - The enum numeric value on the wire for nonFatalStatusCodes to add.public MethodConfig.HedgingPolicy.Builder addAllNonFatalStatusCodesValue(Iterable<Integer> values)
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;values - The enum numeric values on the wire for nonFatalStatusCodes to add.public final MethodConfig.HedgingPolicy.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.HedgingPolicy.Builder>public final MethodConfig.HedgingPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<MethodConfig.HedgingPolicy.Builder>Copyright © 2022 Google LLC. All rights reserved.