Package org.cactoos.func
Class Retry<X,Y>
- java.lang.Object
-
- org.cactoos.func.Retry<X,Y>
-
-
Constructor Summary
Constructors Constructor Description Retry(Func<X,Y> fnc)
Ctor.Retry(Func<X,Y> fnc, int attempts)
Ctor.Retry(Func<X,Y> fnc, int attempts, Duration wait)
Ctor.Retry(Func<X,Y> fnc, Func<Integer,Boolean> ext)
Ctor.Retry(Func<X,Y> fnc, Func<Integer,Boolean> ext, Duration wait)
Ctor.
-
-
-
Constructor Detail
-
Retry
public Retry(Func<X,Y> fnc, int attempts)
Ctor.- Parameters:
fnc
- Func originalattempts
- Maximum number of attempts
-
Retry
public Retry(Func<X,Y> fnc, int attempts, Duration wait)
Ctor.- Parameters:
fnc
- Func originalattempts
- Maximum number of attemptswait
- The executions of the function
-
Retry
public Retry(Func<X,Y> fnc, Func<Integer,Boolean> ext)
Ctor.- Parameters:
fnc
- Func originalext
- Exit condition, returns TRUE if there is no more reason to try
-
-