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:
  • 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

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance 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.
    • getMaxBackoffOrBuilder

      public com.google.protobuf.DurationOrBuilder getMaxBackoffOrBuilder()
       Required. Must be greater than zero.
       
      .google.protobuf.Duration max_backoff = 3;
      Specified by:
      getMaxBackoffOrBuilder in interface MethodConfig.RetryPolicyOrBuilder
    • getBackoffMultiplier

      public float getBackoffMultiplier()
       Required. Must be greater than zero.
       
      float backoff_multiplier = 4;
      Specified by:
      getBackoffMultiplier in interface MethodConfig.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:
      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
    • 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:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static MethodConfig.RetryPolicy.Builder newBuilder()
    • newBuilder

      public static MethodConfig.RetryPolicy.Builder newBuilder(MethodConfig.RetryPolicy prototype)
    • 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
    • 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:
      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