Class MethodConfig.RetryPolicy

    • 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:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.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:
        getMaxAttempts in interface MethodConfig.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:
        hasInitialBackoff in interface MethodConfig.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:
        getInitialBackoff in interface MethodConfig.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:
        getInitialBackoffOrBuilder in interface MethodConfig.RetryPolicyOrBuilder
      • hasMaxBackoff

        public boolean hasMaxBackoff()
         Required. Must be greater than zero.
         
        .google.protobuf.Duration max_backoff = 3;
        Specified by:
        hasMaxBackoff in interface MethodConfig.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:
        getMaxBackoff in interface MethodConfig.RetryPolicyOrBuilder
        Returns:
        The maxBackoff.
      • 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:
        getRetryableStatusCodesList in interface MethodConfig.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:
        getRetryableStatusCodesCount in interface MethodConfig.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:
        getRetryableStatusCodes in interface MethodConfig.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:
        getRetryableStatusCodesValueList in interface MethodConfig.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:
        getRetryableStatusCodesValue in interface MethodConfig.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:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.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
      • newBuilderForType

        public MethodConfig.RetryPolicy.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public MethodConfig.RetryPolicy.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected MethodConfig.RetryPolicy.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<MethodConfig.RetryPolicy> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public MethodConfig.RetryPolicy getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder