Kactoos

kactoos-jvm / nnl.rocks.kactoos.func / Retry

Retry

class Retry<X : Any, Y : Any> : Func<X, Y>

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

Constructors

Name Summary
<init> Retry(proc: Proc<X>, result: Y)
Retry(proc: Proc<X>, result: Y, attempts: Int)
Retry(proc: Proc<X>, result: Y, ext: Func<Int, Boolean>)
Retry(fnc: Func<X, Y>, attempts: Int)
Retry(func: Func<X, Y>)Retry(func: Func<X, Y>, exit: Func<Int, Boolean>)
Func that will try a few times before throwing an exception.

Functions

Name Summary
apply fun apply(input: X): Y
Apply it.