Kactoos

kactoos-jvm / nnl.rocks.kactoos.scalar / RetryScalar

RetryScalar

class RetryScalar<T : Any> : Scalar<T>

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

Constructors

Name Summary
<init> RetryScalar(scalar: KScalar<T>, attempts: Int)
RetryScalar(scalar: KScalar<T>)RetryScalar(origin: KScalar<T>, func: Func<Int, Boolean>)
Func that will try a few times before throwing an exception.

Functions

Name Summary
invoke fun invoke(): T
Get value of this Scalar