Class RetryingInvoker

  • All Implemented Interfaces:
    Invoker

    public class RetryingInvoker
    extends Object
    implements 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 Detail

      • RetryingInvoker

        public RetryingInvoker​(Duration... retryIntervals)
      • RetryingInvoker

        protected RetryingInvoker​(List<Duration> retryIntevals)
    • Method Detail

      • invoke

        public <R,​E extends Exception> R invoke​(org.wildfly.common.function.ExceptionSupplier<R,​E> task)
                                               throws E extends Exception
        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 extends Exception
        Specified by:
        invoke in interface Invoker
        Throws:
        E extends Exception