RetryConfig
data class RetryConfig(val maxAttempts: Int, val retryPredicate: OnExceptionPredicate, val retryOnResultPredicate: OnResultPredicate, val delayStrategy: RetryDelayStrategy, val exceptionHandler: ExceptionHandler)(source)
Represents a configuration for retrying an operation. A configuration is a collection of policies that determine the behaviour of a retry mechanism. To create an instance, use the retryConfig builder.
Parameters
maxAttempts
the maximum number of attempts (including the initial call as the first attempt).
retryPredicate
the predicate to determine if the operation should be retried based on the caught throwable.
retryOnResultPredicate
the predicate to determine if the operation should be retried based on its result.
delayStrategy
the strategy to determine the delay duration between retries.
exceptionHandler
the handler for exceptions that occur during a retry operation.
See also
Constructors
Link copied to clipboard
constructor(maxAttempts: Int, retryPredicate: OnExceptionPredicate, retryOnResultPredicate: OnResultPredicate, delayStrategy: RetryDelayStrategy, exceptionHandler: ExceptionHandler)