Kactoos

kactoos-jvm / nnl.rocks.kactoos.scalar / RetryScalar / <init>

<init>

RetryScalar(scalar: KScalar<T>, attempts: Int)

Parameters

scalar - KScalar original

attempts - Maximum number of attemptsRetryScalar(scalar: KScalar<T>)RetryScalar(origin: KScalar<T>, func: Func<Int, Boolean>)

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

There is no thread-safety guarantee.

Parameters

T - Type of output

origin - Func original

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

Since 0.4