Package io.grpc.serviceconfig
Interface MethodConfig.RetryPolicyOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
MethodConfig.RetryPolicy,MethodConfig.RetryPolicy.Builder
- Enclosing class:
- MethodConfig
public static interface MethodConfig.RetryPolicyOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionfloatRequired.com.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.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.booleanExponential backoff parameters.booleanRequired.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getMaxAttempts
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;- Returns:
- The maxAttempts.
-
hasInitialBackoff
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;- Returns:
- Whether the initialBackoff field is set.
-
getInitialBackoff
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;- Returns:
- The initialBackoff.
-
getInitialBackoffOrBuilder
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; -
hasMaxBackoff
boolean hasMaxBackoff()Required. Must be greater than zero.
.google.protobuf.Duration max_backoff = 3;- Returns:
- Whether the maxBackoff field is set.
-
getMaxBackoff
com.google.protobuf.Duration getMaxBackoff()Required. Must be greater than zero.
.google.protobuf.Duration max_backoff = 3;- Returns:
- The maxBackoff.
-
getMaxBackoffOrBuilder
com.google.protobuf.DurationOrBuilder getMaxBackoffOrBuilder()Required. Must be greater than zero.
.google.protobuf.Duration max_backoff = 3; -
getBackoffMultiplier
float getBackoffMultiplier()Required. Must be greater than zero.
float backoff_multiplier = 4;- Returns:
- The backoffMultiplier.
-
getRetryableStatusCodesList
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;- Returns:
- A list containing the retryableStatusCodes.
-
getRetryableStatusCodesCount
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;- Returns:
- The count of retryableStatusCodes.
-
getRetryableStatusCodes
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;- 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;- Returns:
- A list containing the enum numeric values on the wire for retryableStatusCodes.
-
getRetryableStatusCodesValue
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;- Parameters:
index- The index of the value to return.- Returns:
- The enum numeric value on the wire of retryableStatusCodes at the given index.
-