- All Implemented Interfaces:
Invoker
A invocation strategy that invokes a given task, retrying a configurable number of times on failure using backoff sleep intervals.
- Author:
- Paul Ferraro
-
Constructor Summary
Constructors
-
Method Summary
invoke(org.wildfly.common.function.ExceptionRunnable<E> action)
invoke(org.wildfly.common.function.ExceptionSupplier<R,E> task)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
RetryingInvoker
public RetryingInvoker(Duration... retryIntervals)
-
-
Method Details
-
invoke
public <R,
E extends Exception> R invoke(org.wildfly.common.function.ExceptionSupplier<R,E> task)
throws E
- Specified by:
invoke in interface Invoker
- Throws:
E extends Exception
-
invoke
public <E extends Exception> void invoke(org.wildfly.common.function.ExceptionRunnable<E> action)
throws E
- Specified by:
invoke in interface Invoker
- Throws:
E extends Exception