Builder

class Builder

Fluent builder for RetryConfig, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Sets RetryConfig.exceptionClasses, the types of failures to retry on, or unsets it if null. Leaves RetryConfig.exceptions unchanged. Java callers pass Class objects, as a list or one by one, to exceptionJavaClasses instead.

fun exceptionClasses(exceptionClass: KClass<out Exception>, vararg moreExceptionClasses: KClass<out Exception>): RetryConfig.Builder

Sets RetryConfig.exceptionClasses from the given types, like the list overload.

Link copied to clipboard

Sets RetryConfig.exceptionClasses from Java classes, or unsets it if null. Leaves RetryConfig.exceptions unchanged.

fun exceptionJavaClasses(exceptionClass: JavaClass<out Exception>, vararg moreExceptionClasses: JavaClass<out Exception>): RetryConfig.Builder

Sets RetryConfig.exceptionClasses from the given Java classes, like the list overload.

Link copied to clipboard

Sets RetryConfig.exceptions, the simple class names of failures to retry on, or unsets it if null. Leaves RetryConfig.exceptionClasses unchanged.

fun exceptions(exception: String, vararg moreExceptions: String): RetryConfig.Builder

Sets RetryConfig.exceptions from the given names, like the list overload.

Link copied to clipboard
fun initialDelayMillis(initialDelayMillis: Long): RetryConfig.Builder

Sets RetryConfig.initialDelay in milliseconds.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Sets RetryConfig.maxDelay in milliseconds.