public static final class RpcRetryOptions.Builder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
RpcRetryOptions.Builder |
addDoNotRetry(io.grpc.Status.Code code,
java.lang.Class<? extends com.google.protobuf.GeneratedMessageV3> detailsClass)
Add
Status.Code with associated details class to not retry. |
RpcRetryOptions |
build()
Build RetryOptions without performing validation as validation should be done after merging
with
MethodRetry . |
RpcRetryOptions.Builder |
setBackoffCoefficient(double backoffCoefficient)
Coefficient used to calculate the next retry interval.
|
RpcRetryOptions.Builder |
setExpiration(java.time.Duration expiration)
Maximum time to retry.
|
RpcRetryOptions.Builder |
setInitialInterval(java.time.Duration initialInterval)
Interval of the first retry.
|
RpcRetryOptions.Builder |
setMaximumAttempts(int maximumAttempts)
Maximum number of attempts.
|
RpcRetryOptions.Builder |
setMaximumInterval(java.time.Duration maximumInterval)
Maximum interval between retries.
|
RpcRetryOptions.Builder |
setRetryOptions(RpcRetryOptions o)
The parameter options takes precedence.
|
RpcRetryOptions |
validateBuildWithDefaults()
Validates property values and builds RetryOptions with default values.
|
public RpcRetryOptions.Builder setInitialInterval(java.time.Duration initialInterval)
public RpcRetryOptions.Builder setExpiration(java.time.Duration expiration)
public RpcRetryOptions.Builder setBackoffCoefficient(double backoffCoefficient)
public RpcRetryOptions.Builder setMaximumAttempts(int maximumAttempts)
public RpcRetryOptions.Builder setMaximumInterval(java.time.Duration maximumInterval)
public RpcRetryOptions.Builder addDoNotRetry(io.grpc.Status.Code code, java.lang.Class<? extends com.google.protobuf.GeneratedMessageV3> detailsClass)
Status.Code
with associated details class to not retry. If
detailsClass
is null all failures with the code are non retryable.public RpcRetryOptions.Builder setRetryOptions(RpcRetryOptions o)
public RpcRetryOptions build()
MethodRetry
.public RpcRetryOptions validateBuildWithDefaults()