Kactoos

kactoos-jvm / nnl.rocks.kactoos.func / Retry / <init>

<init>

Retry(proc: Proc<X>, result: Y)

Parameters

proc - Func original

Since 0.4

Retry(proc: Proc<X>, result: Y, attempts: Int)

Parameters

proc - Func original

attempts - Maximum number of attempts

Since 0.4

Retry(proc: Proc<X>, result: Y, ext: Func<Int, Boolean>)

Parameters

proc - Func original

ext - Exit condition, returns TRUE if there is no more reason to try

Since 0.4

Retry(fnc: Func<X, Y>, attempts: Int)

Parameters

fnc - Func original

attempts - Maximum number of attemptsRetry(func: Func<X, Y>)Retry(func: Func<X, Y>, exit: Func<Int, Boolean>)

Func that will try a few times before throwing an exception.

There is no thread-safety guarantee.

Parameters

func - Func original

exit - Exit condition, returns TRUE if there is no more reason to try

X - Type of input

Y - Type of output

Since 0.4