decorateCtxSupplier

inline fun <R, T> decorateCtxSupplier(noinline resultMapper: ResultMapper<R, T> = defaultResultMapper(), crossinline block: CtxSupplier<RetryContext, R>): Supplier<T?>(source)

Decorates a Supplier with this retry mechanism by providing an additional RetryContext.

Parameters

resultMapper

The mapper to transform the result or the exception. By default, no result mapping is performed, and exception handling defaults to the handler configured in the configuration.

block

The operation to decorate and execute later.

See also