Package-level declarations

Types

Link copied to clipboard
sealed interface BackoffStrategy

Strategy for computing the delay before the next retry attempt.

Link copied to clipboard

A stateless implementation of the AWS decorrelated jitter backoff strategy.

Link copied to clipboard

A default implementation of the RetryPolicy interface.

Link copied to clipboard
class ExponentialBackoff(val initialDelay: Duration = 100.milliseconds, val maxDelay: Duration = 10.seconds, val factor: Double = 2.0, val jitter: Boolean = true) : BackoffStrategy

A backoff strategy that increases the delay between retries exponentially.

Link copied to clipboard
class FixedBackoff(val delay: Duration = 1.seconds) : BackoffStrategy

A backoff strategy that waits for a fixed amount of time between retry attempts. The delay is the same regardless of the attempt number.

Link copied to clipboard
class LinearBackoff(val delay: Duration = 1.seconds) : BackoffStrategy

A backoff strategy that waits a constant, linear amount of time between each retry attempt. The delay is the same for every attempt, regardless of the attempt number.

Link copied to clipboard
class RetryableResultException(message: String = "Retry requested by shouldRetryResult", val lastValue: Any? = null) : Exception

Passed to RetryPolicyConfig.onRetry (and emitted as com.santimattius.resilient.telemetry.ResilientEvent.RetryAttempt) when a retry is triggered by RetryPolicyConfig.shouldRetryResult, not by an exception from block.

Link copied to clipboard
interface RetryPolicy

Defines a contract for implementing resilience strategies that automatically retry a failed operation.

Link copied to clipboard

Configuration class for defining the behavior of a RetryPolicy.