Class RetryingInvoker

java.lang.Object
org.wildfly.clustering.ee.cache.retry.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 Details

    • RetryingInvoker

      public RetryingInvoker(Duration... retryIntervals)
    • RetryingInvoker

      protected RetryingInvoker(List<Duration> retryIntevals)
  • 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