RNGUtils |
Utilities for generating random values. object RNGUtils |
RetriesExceededException |
class RetriesExceededException : Exception |
kotlin.collections.Collection |
attempt |
A suspending function that makes multiple attempts to successfully execute a code block. Supports variable delays, logging and back off. The result of the computation on the first successful execution or the exception thrown on the last failing execution is propagated to the caller. suspend fun <T> attempt(maxAttempts: Int = 5, initialDelay: Long = 1000, maxDelay: Long = Long.MAX_VALUE, factor: Double = 1.0, logger: KLogger? = null, body: () -> T): T |
retry |
suspend fun <T> retry(retryDelay: Duration = Duration.ZERO, attempts: Int = Int.MAX_VALUE, action: suspend () -> T): T? |