public static final class RetryOptions.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Builder(RetryOptions o) |
Modifier and Type | Method and Description |
---|---|
RetryOptions |
build()
Build RetryOptions without performing validation as validation should be done after merging
with
MethodRetry . |
RetryOptions.Builder |
setBackoffCoefficient(double backoffCoefficient)
Coefficient used to calculate the next retry interval.
|
RetryOptions.Builder |
setDoNotRetry(java.lang.Class<? extends java.lang.Throwable>... doNotRetry)
List of exceptions to retry.
|
RetryOptions.Builder |
setExpiration(java.time.Duration expiration)
Maximum time to retry.
|
RetryOptions.Builder |
setInitialInterval(java.time.Duration initialInterval)
Interval of the first retry.
|
RetryOptions.Builder |
setMaximumAttempts(int maximumAttempts)
Maximum number of attempts.
|
RetryOptions.Builder |
setMaximumInterval(java.time.Duration maximumInterval)
Maximum interval between retries.
|
RetryOptions |
validateBuildWithDefaults()
Validates property values and builds RetryOptions with default values.
|
public Builder()
public Builder(RetryOptions o)
public RetryOptions.Builder setInitialInterval(java.time.Duration initialInterval)
public RetryOptions.Builder setExpiration(java.time.Duration expiration)
public RetryOptions.Builder setBackoffCoefficient(double backoffCoefficient)
public RetryOptions.Builder setMaximumAttempts(int maximumAttempts)
public RetryOptions.Builder setMaximumInterval(java.time.Duration maximumInterval)
@SafeVarargs public final RetryOptions.Builder setDoNotRetry(java.lang.Class<? extends java.lang.Throwable>... doNotRetry)
ActivityFailureException
and ChildWorkflowFailureException
is looked at.
Error
and CancellationException
are never retried and
are not even passed to this filter.
public RetryOptions build()
MethodRetry
.public RetryOptions validateBuildWithDefaults()