Class InvocationRetryPolicy.Builder
java.lang.Object
dev.restate.sdk.endpoint.definition.InvocationRetryPolicy.Builder
- Enclosing class:
InvocationRetryPolicy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
@Nullable Double
Exponential backoff multiplier used to compute the next retry delay.exponentiationFactor
(@Nullable Double exponentiationFactor) Sets the exponential backoff multiplier used to compute the next retry delay.@Nullable Duration
Initial delay before the first retry attempt.initialInterval
(@Nullable Duration initialInterval) Sets the initial delay before the first retry attempt.@Nullable Integer
Maximum number of attempts before giving up retrying.maxAttempts
(@Nullable Integer maxAttempts) Sets the maximum number of attempts before giving up retrying.@Nullable Duration
Upper bound for the computed retry delay.maxInterval
(@Nullable Duration maxInterval) Sets the upper bound for the computed retry delay.@Nullable InvocationRetryPolicy.OnMaxAttempts
Behavior when the configuredmaxAttempts()
is reached.onMaxAttempts
(@Nullable InvocationRetryPolicy.OnMaxAttempts onMaxAttempts) Sets the behavior when the configuredmaxAttempts()
is reached.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
initialInterval
Initial delay before the first retry attempt. -
initialInterval
Sets the initial delay before the first retry attempt. -
exponentiationFactor
Exponential backoff multiplier used to compute the next retry delay. -
exponentiationFactor
Sets the exponential backoff multiplier used to compute the next retry delay. -
maxInterval
Upper bound for the computed retry delay. -
maxInterval
Sets the upper bound for the computed retry delay. -
maxAttempts
Maximum number of attempts before giving up retrying.The initial call counts as the first attempt; retries increment the count by 1. When giving up, the behavior defined with
onMaxAttempts()
will be applied.- See Also:
-
maxAttempts
Sets the maximum number of attempts before giving up retrying.The initial call counts as the first attempt; retries increment the count by 1.
-
onMaxAttempts
Behavior when the configuredmaxAttempts()
is reached.- See Also:
-
onMaxAttempts
public InvocationRetryPolicy.Builder onMaxAttempts(@Nullable InvocationRetryPolicy.OnMaxAttempts onMaxAttempts) Sets the behavior when the configuredmaxAttempts()
is reached. -
build
-