RetryPolicy

Constructors

Link copied to clipboard
private constructor(maxAttempts: Int, backoffMs: Long, maxBackoffMs: Long, allowedMethods: Set<HttpMethod>)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private val MAX_BACKOFF_MS: Long = 30000
Link copied to clipboard
private val maxAttempts: Int
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun getBackoffMs(): Long
Link copied to clipboard
abstract fun getMaxBackoffMs(): Long
Link copied to clipboard
open fun isEnabled(): Boolean
Link copied to clipboard
open fun none(): RetryPolicy
Link copied to clipboard
open fun shouldRetry(currentAttempt: Int, method: HttpMethod): Boolean
Link copied to clipboard
open fun with(maxAttempts: Int, backoff: Duration, allowedMethods: Array<HttpMethod>): RetryPolicy
open fun with(maxAttempts: Int, backoff: Duration, maxBackoff: Duration, allowedMethods: Array<HttpMethod>): RetryPolicy
Link copied to clipboard
open fun withSafeMethods(maxAttempts: Int, backoff: Duration): RetryPolicy
open fun withSafeMethods(maxAttempts: Int, backoff: Duration, maxBackoff: Duration): RetryPolicy