public static final class ServiceConfig.RetryThrottlingPolicy extends com.google.protobuf.GeneratedMessageV3 implements ServiceConfig.RetryThrottlingPolicyOrBuilder
If a RetryThrottlingPolicy is provided, gRPC will automatically throttle retry attempts and hedged RPCs when the client's ratio of failures to successes exceeds a threshold. For each server name, the gRPC client will maintain a token_count which is initially set to max_tokens. Every outgoing RPC (regardless of service or method invoked) will change token_count as follows: - Every failed RPC will decrement the token_count by 1. - Every successful RPC will increment the token_count by token_ratio. If token_count is less than or equal to max_tokens / 2, then RPCs will not be retried and hedged RPCs will not be sent.Protobuf type
grpc.service_config.ServiceConfig.RetryThrottlingPolicy| Modifier and Type | Class and Description |
|---|---|
static class |
ServiceConfig.RetryThrottlingPolicy.Builder
If a RetryThrottlingPolicy is provided, gRPC will automatically throttle
retry attempts and hedged RPCs when the client's ratio of failures to
successes exceeds a threshold.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_TOKENS_FIELD_NUMBER |
static int |
TOKEN_RATIO_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static ServiceConfig.RetryThrottlingPolicy |
getDefaultInstance() |
ServiceConfig.RetryThrottlingPolicy |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
int |
getMaxTokens()
The number of tokens starts at max_tokens.
|
com.google.protobuf.Parser<ServiceConfig.RetryThrottlingPolicy> |
getParserForType() |
int |
getSerializedSize() |
float |
getTokenRatio()
The amount of tokens to add on each successful RPC.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static ServiceConfig.RetryThrottlingPolicy.Builder |
newBuilder() |
static ServiceConfig.RetryThrottlingPolicy.Builder |
newBuilder(ServiceConfig.RetryThrottlingPolicy prototype) |
ServiceConfig.RetryThrottlingPolicy.Builder |
newBuilderForType() |
protected ServiceConfig.RetryThrottlingPolicy.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static ServiceConfig.RetryThrottlingPolicy |
parseDelimitedFrom(InputStream input) |
static ServiceConfig.RetryThrottlingPolicy |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ServiceConfig.RetryThrottlingPolicy |
parseFrom(byte[] data) |
static ServiceConfig.RetryThrottlingPolicy |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ServiceConfig.RetryThrottlingPolicy |
parseFrom(ByteBuffer data) |
static ServiceConfig.RetryThrottlingPolicy |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ServiceConfig.RetryThrottlingPolicy |
parseFrom(com.google.protobuf.ByteString data) |
static ServiceConfig.RetryThrottlingPolicy |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ServiceConfig.RetryThrottlingPolicy |
parseFrom(com.google.protobuf.CodedInputStream input) |
static ServiceConfig.RetryThrottlingPolicy |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ServiceConfig.RetryThrottlingPolicy |
parseFrom(InputStream input) |
static ServiceConfig.RetryThrottlingPolicy |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<ServiceConfig.RetryThrottlingPolicy> |
parser() |
ServiceConfig.RetryThrottlingPolicy.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int MAX_TOKENS_FIELD_NUMBER
public static final int TOKEN_RATIO_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public int getMaxTokens()
The number of tokens starts at max_tokens. The token_count will always be between 0 and max_tokens. This field is required and must be greater than zero.
uint32 max_tokens = 1;getMaxTokens in interface ServiceConfig.RetryThrottlingPolicyOrBuilderpublic float getTokenRatio()
The amount of tokens to add on each successful RPC. Typically this will be some number between 0 and 1, e.g., 0.1. This field is required and must be greater than zero. Up to 3 decimal places are supported.
float token_ratio = 2;getTokenRatio in interface ServiceConfig.RetryThrottlingPolicyOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static ServiceConfig.RetryThrottlingPolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ServiceConfig.RetryThrottlingPolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ServiceConfig.RetryThrottlingPolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ServiceConfig.RetryThrottlingPolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ServiceConfig.RetryThrottlingPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ServiceConfig.RetryThrottlingPolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ServiceConfig.RetryThrottlingPolicy parseFrom(InputStream input) throws IOException
IOExceptionpublic static ServiceConfig.RetryThrottlingPolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ServiceConfig.RetryThrottlingPolicy parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static ServiceConfig.RetryThrottlingPolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ServiceConfig.RetryThrottlingPolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static ServiceConfig.RetryThrottlingPolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic ServiceConfig.RetryThrottlingPolicy.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static ServiceConfig.RetryThrottlingPolicy.Builder newBuilder()
public static ServiceConfig.RetryThrottlingPolicy.Builder newBuilder(ServiceConfig.RetryThrottlingPolicy prototype)
public ServiceConfig.RetryThrottlingPolicy.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected ServiceConfig.RetryThrottlingPolicy.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static ServiceConfig.RetryThrottlingPolicy getDefaultInstance()
public static com.google.protobuf.Parser<ServiceConfig.RetryThrottlingPolicy> parser()
public com.google.protobuf.Parser<ServiceConfig.RetryThrottlingPolicy> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public ServiceConfig.RetryThrottlingPolicy getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2022 Google LLC. All rights reserved.