Class RecoverableRetryStrategy

java.lang.Object
io.camunda.zeebe.scheduler.retry.RecoverableRetryStrategy
All Implemented Interfaces:
RetryStrategy

public final class RecoverableRetryStrategy extends Object implements RetryStrategy
  • Constructor Details

    • RecoverableRetryStrategy

      public RecoverableRetryStrategy(ActorControl actor)
  • Method Details

    • runWithRetry

      public ActorFuture<Boolean> runWithRetry(OperationToRetry callable)
      Description copied from interface: RetryStrategy
      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.

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

      public ActorFuture<Boolean> runWithRetry(OperationToRetry callable, BooleanSupplier condition)
      Description copied from interface: RetryStrategy
      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.

      Specified by:
      runWithRetry in interface RetryStrategy
      Parameters:
      callable - the callable which should be executed
      condition - 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