Interface RetryStrategy

All Known Implementing Classes:
AbortableRetryStrategy, BackOffRetryStrategy, EndlessRetryStrategy, RecoverableRetryStrategy

public interface RetryStrategy
  • Method Details

    • runWithRetry

      ActorFuture<Boolean> runWithRetry(OperationToRetry callable)
      Runs the given runnable with the defined retry strategy.

      Returns an actor future, which will be completed when the callable was successfully executed and has returned true.

      Parameters:
      callable - the callable which should be executed
      Returns:
      a future, which is completed with true if the execution was successful
    • runWithRetry

      ActorFuture<Boolean> runWithRetry(OperationToRetry callable, BooleanSupplier terminateCondition)
      Runs the given runnable with the defined retry strategy.

      Returns an actor future, which will be completed when the callable was successfully executed and has returned true.

      Parameters:
      callable - the callable which should be executed
      terminateCondition - condition is called when callable returns false, if terminate condition returns true the retry strategy is aborted
      Returns:
      a future, which is completed with true if the execution was successful