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()

函数

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

集合(Sets) RetryConfig.exceptionClasses需要重试的故障类型;如果该值为 `null`,则表示不需要重试(即该参数被重置为默认值)。 RetryConfig.exceptions 保持不变。Java 调用者会将每个类进行转换(即执行相应的转换操作)。 JvmClassMappingKt.getKotlinClass.

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

集合(Sets) RetryConfig.exceptionClasses 从这些给定的类型中选择合适的实现方式,就像处理列表的重载(list overload)一样。

Link copied to clipboard

集合(Sets) RetryConfig.exceptions这些简单的类名用于标识那些需要重试的错误情况;如果该类名为 `null`,则表示不需要重试。 RetryConfig.exceptionClasses 未发生变化。

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

集合(Sets) RetryConfig.exceptions 从这些给定的名字中,可以像使用列表重载功能一样进行处理。

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

集合(Sets) RetryConfig.initialDelay 以毫秒为单位。

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

集合(Sets) RetryConfig.maxDelay 以毫秒为单位。