Package io.grpc.serviceconfig
Class MethodConfig.RetryPolicy
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.grpc.serviceconfig.MethodConfig.RetryPolicy
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,MethodConfig.RetryPolicyOrBuilder,Serializable
- Enclosing class:
- MethodConfig
public static final class MethodConfig.RetryPolicy
extends com.google.protobuf.GeneratedMessageV3
implements MethodConfig.RetryPolicyOrBuilder
The retry policy for outgoing RPCs.Protobuf type
grpc.service_config.MethodConfig.RetryPolicy- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe retry policy for outgoing RPCs.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanfloatRequired.static MethodConfig.RetryPolicystatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.DurationExponential backoff parameters.com.google.protobuf.DurationOrBuilderExponential backoff parameters.intThe maximum number of RPC attempts, including the original attempt.com.google.protobuf.DurationRequired.com.google.protobuf.DurationOrBuilderRequired.com.google.protobuf.Parser<MethodConfig.RetryPolicy>com.google.rpc.CodegetRetryableStatusCodes(int index) The set of status codes which may be retried.intThe set of status codes which may be retried.List<com.google.rpc.Code>The set of status codes which may be retried.intgetRetryableStatusCodesValue(int index) The set of status codes which may be retried.The set of status codes which may be retried.intinthashCode()booleanExponential backoff parameters.booleanRequired.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleannewBuilder(MethodConfig.RetryPolicy prototype) protected MethodConfig.RetryPolicy.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static MethodConfig.RetryPolicyparseDelimitedFrom(InputStream input) static MethodConfig.RetryPolicyparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MethodConfig.RetryPolicyparseFrom(byte[] data) static MethodConfig.RetryPolicyparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MethodConfig.RetryPolicyparseFrom(com.google.protobuf.ByteString data) static MethodConfig.RetryPolicyparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MethodConfig.RetryPolicyparseFrom(com.google.protobuf.CodedInputStream input) static MethodConfig.RetryPolicyparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MethodConfig.RetryPolicyparseFrom(InputStream input) static MethodConfig.RetryPolicyparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MethodConfig.RetryPolicyparseFrom(ByteBuffer data) static MethodConfig.RetryPolicyparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<MethodConfig.RetryPolicy>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, 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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
MAX_ATTEMPTS_FIELD_NUMBER
public static final int MAX_ATTEMPTS_FIELD_NUMBER- See Also:
-
INITIAL_BACKOFF_FIELD_NUMBER
public static final int INITIAL_BACKOFF_FIELD_NUMBER- See Also:
-
MAX_BACKOFF_FIELD_NUMBER
public static final int MAX_BACKOFF_FIELD_NUMBER- See Also:
-
BACKOFF_MULTIPLIER_FIELD_NUMBER
public static final int BACKOFF_MULTIPLIER_FIELD_NUMBER- See Also:
-
RETRYABLE_STATUS_CODES_FIELD_NUMBER
public static final int RETRYABLE_STATUS_CODES_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getMaxAttempts
public int getMaxAttempts()The maximum number of RPC 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;- Specified by:
getMaxAttemptsin interfaceMethodConfig.RetryPolicyOrBuilder- Returns:
- The maxAttempts.
-
hasInitialBackoff
public boolean hasInitialBackoff()Exponential backoff parameters. The initial retry attempt will occur at random(0, initial_backoff). In general, the nth attempt will occur at random(0, min(initial_backoff*backoff_multiplier**(n-1), max_backoff)). Required. Must be greater than zero.
.google.protobuf.Duration initial_backoff = 2;- Specified by:
hasInitialBackoffin interfaceMethodConfig.RetryPolicyOrBuilder- Returns:
- Whether the initialBackoff field is set.
-
getInitialBackoff
public com.google.protobuf.Duration getInitialBackoff()Exponential backoff parameters. The initial retry attempt will occur at random(0, initial_backoff). In general, the nth attempt will occur at random(0, min(initial_backoff*backoff_multiplier**(n-1), max_backoff)). Required. Must be greater than zero.
.google.protobuf.Duration initial_backoff = 2;- Specified by:
getInitialBackoffin interfaceMethodConfig.RetryPolicyOrBuilder- Returns:
- The initialBackoff.
-
getInitialBackoffOrBuilder
public com.google.protobuf.DurationOrBuilder getInitialBackoffOrBuilder()Exponential backoff parameters. The initial retry attempt will occur at random(0, initial_backoff). In general, the nth attempt will occur at random(0, min(initial_backoff*backoff_multiplier**(n-1), max_backoff)). Required. Must be greater than zero.
.google.protobuf.Duration initial_backoff = 2;- Specified by:
getInitialBackoffOrBuilderin interfaceMethodConfig.RetryPolicyOrBuilder
-
hasMaxBackoff
public boolean hasMaxBackoff()Required. Must be greater than zero.
.google.protobuf.Duration max_backoff = 3;- Specified by:
hasMaxBackoffin interfaceMethodConfig.RetryPolicyOrBuilder- Returns:
- Whether the maxBackoff field is set.
-
getMaxBackoff
public com.google.protobuf.Duration getMaxBackoff()Required. Must be greater than zero.
.google.protobuf.Duration max_backoff = 3;- Specified by:
getMaxBackoffin interfaceMethodConfig.RetryPolicyOrBuilder- Returns:
- The maxBackoff.
-
getMaxBackoffOrBuilder
public com.google.protobuf.DurationOrBuilder getMaxBackoffOrBuilder()Required. Must be greater than zero.
.google.protobuf.Duration max_backoff = 3;- Specified by:
getMaxBackoffOrBuilderin interfaceMethodConfig.RetryPolicyOrBuilder
-
getBackoffMultiplier
public float getBackoffMultiplier()Required. Must be greater than zero.
float backoff_multiplier = 4;- Specified by:
getBackoffMultiplierin interfaceMethodConfig.RetryPolicyOrBuilder- Returns:
- The backoffMultiplier.
-
getRetryableStatusCodesList
The set of status codes which may be retried. This field is required and must be non-empty.
repeated .google.rpc.Code retryable_status_codes = 5;- Specified by:
getRetryableStatusCodesListin interfaceMethodConfig.RetryPolicyOrBuilder- Returns:
- A list containing the retryableStatusCodes.
-
getRetryableStatusCodesCount
public int getRetryableStatusCodesCount()The set of status codes which may be retried. This field is required and must be non-empty.
repeated .google.rpc.Code retryable_status_codes = 5;- Specified by:
getRetryableStatusCodesCountin interfaceMethodConfig.RetryPolicyOrBuilder- Returns:
- The count of retryableStatusCodes.
-
getRetryableStatusCodes
public com.google.rpc.Code getRetryableStatusCodes(int index) The set of status codes which may be retried. This field is required and must be non-empty.
repeated .google.rpc.Code retryable_status_codes = 5;- Specified by:
getRetryableStatusCodesin interfaceMethodConfig.RetryPolicyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The retryableStatusCodes at the given index.
-
getRetryableStatusCodesValueList
The set of status codes which may be retried. This field is required and must be non-empty.
repeated .google.rpc.Code retryable_status_codes = 5;- Specified by:
getRetryableStatusCodesValueListin interfaceMethodConfig.RetryPolicyOrBuilder- Returns:
- A list containing the enum numeric values on the wire for retryableStatusCodes.
-
getRetryableStatusCodesValue
public int getRetryableStatusCodesValue(int index) The set of status codes which may be retried. This field is required and must be non-empty.
repeated .google.rpc.Code retryable_status_codes = 5;- Specified by:
getRetryableStatusCodesValuein interfaceMethodConfig.RetryPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The enum numeric value on the wire of retryableStatusCodes at the given index.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static MethodConfig.RetryPolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MethodConfig.RetryPolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MethodConfig.RetryPolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MethodConfig.RetryPolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MethodConfig.RetryPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MethodConfig.RetryPolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static MethodConfig.RetryPolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static MethodConfig.RetryPolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static MethodConfig.RetryPolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static MethodConfig.RetryPolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected MethodConfig.RetryPolicy.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-