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 typegrpc.service_config.MethodConfig.RetryPolicy- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMethodConfig.RetryPolicy.BuilderThe 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<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
-
-
Field Summary
Fields Modifier and Type Field Description static intBACKOFF_MULTIPLIER_FIELD_NUMBERstatic intINITIAL_BACKOFF_FIELD_NUMBERstatic intMAX_ATTEMPTS_FIELD_NUMBERstatic intMAX_BACKOFF_FIELD_NUMBERstatic intRETRYABLE_STATUS_CODES_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)floatgetBackoffMultiplier()Required.static MethodConfig.RetryPolicygetDefaultInstance()MethodConfig.RetryPolicygetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.DurationgetInitialBackoff()Exponential backoff parameters.com.google.protobuf.DurationOrBuildergetInitialBackoffOrBuilder()Exponential backoff parameters.intgetMaxAttempts()The maximum number of RPC attempts, including the original attempt.com.google.protobuf.DurationgetMaxBackoff()Required.com.google.protobuf.DurationOrBuildergetMaxBackoffOrBuilder()Required.com.google.protobuf.Parser<MethodConfig.RetryPolicy>getParserForType()com.google.rpc.CodegetRetryableStatusCodes(int index)The set of status codes which may be retried.intgetRetryableStatusCodesCount()The set of status codes which may be retried.List<com.google.rpc.Code>getRetryableStatusCodesList()The set of status codes which may be retried.intgetRetryableStatusCodesValue(int index)The set of status codes which may be retried.List<Integer>getRetryableStatusCodesValueList()The set of status codes which may be retried.intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()inthashCode()booleanhasInitialBackoff()Exponential backoff parameters.booleanhasMaxBackoff()Required.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static MethodConfig.RetryPolicy.BuildernewBuilder()static MethodConfig.RetryPolicy.BuildernewBuilder(MethodConfig.RetryPolicy prototype)MethodConfig.RetryPolicy.BuildernewBuilderForType()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()MethodConfig.RetryPolicy.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
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, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
MAX_ATTEMPTS_FIELD_NUMBER
public static final int MAX_ATTEMPTS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
INITIAL_BACKOFF_FIELD_NUMBER
public static final int INITIAL_BACKOFF_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MAX_BACKOFF_FIELD_NUMBER
public static final int MAX_BACKOFF_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BACKOFF_MULTIPLIER_FIELD_NUMBER
public static final int BACKOFF_MULTIPLIER_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RETRYABLE_STATUS_CODES_FIELD_NUMBER
public static final int RETRYABLE_STATUS_CODES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin 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
public List<com.google.rpc.Code> 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
public List<Integer> 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
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- 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
public boolean equals(Object obj)
- 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
public static MethodConfig.RetryPolicy parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static MethodConfig.RetryPolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static MethodConfig.RetryPolicy parseDelimitedFrom(InputStream input) throws IOException
- 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
public MethodConfig.RetryPolicy.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static MethodConfig.RetryPolicy.Builder newBuilder()
-
newBuilder
public static MethodConfig.RetryPolicy.Builder newBuilder(MethodConfig.RetryPolicy prototype)
-
toBuilder
public MethodConfig.RetryPolicy.Builder 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
public static MethodConfig.RetryPolicy getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<MethodConfig.RetryPolicy> parser()
-
getParserForType
public com.google.protobuf.Parser<MethodConfig.RetryPolicy> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public MethodConfig.RetryPolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-