data class RetryPolicy(
val maxRetries: Int = 3,
val initialDelayMs: Long = 1000,
val backoffMultiplier: Double = 2.0,
val maxDelayMs: Long,
)RetryPolicy
(
maxRetries
, initialDelayMs
, backoffMultiplier
, maxDelayMs
)
|
Signature
constructor(
maxRetries: Int = 3,
initialDelayMs: Long = 1000,
backoffMultiplier: Double = 2.0,
maxDelayMs: Long,
)Parameters maxRetries: Int
Maximum number of retry attempts before giving up.
initialDelayMs: Long
Delay before the first retry, in milliseconds.
backoffMultiplier: Double
Multiplier applied to delay after each attempt (exponential backoff).
maxDelayMs: Long
Cap on the computed delay.
Returns RetryPolicy |
backoffMultiplier
: Double
[Get] |
Multiplier applied to delay after each attempt (exponential backoff).
Signature
val backoffMultiplier: Double = 2.0 |
initialDelayMs
: Long
[Get] |
Delay before the first retry, in milliseconds.
Signature
val initialDelayMs: Long = 1000 |
maxDelayMs
: Long
[Get] |
Cap on the computed delay.
Signature
val maxDelayMs: Long |
maxRetries
: Int
[Get] |
Maximum number of retry attempts before giving up.
Signature
val maxRetries: Int = 3 |
delayForAttempt
(
attempt
)
|
Signature
fun delayForAttempt(attempt: Int): Long Parameters attempt: IntReturns Long |