API reference

RetryPolicy Class

Advisory retry policy for 3p consumers. Not enforced by PakDownloadManager — the 3p decides whether and how to retry. This provides sensible defaults they can use or override.

Signature

data class RetryPolicy(
    val maxRetries: Int = 3,
    val initialDelayMs: Long = 1000,
    val backoffMultiplier: Double = 2.0,
    val maxDelayMs: Long,
)

Constructors

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

Properties

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

Methods

delayForAttempt ( attempt )
Signature
fun delayForAttempt(attempt: Int): Long
Parameters
attempt: Int
Returns
Long