Package io.camunda.zeebe.scheduler.retry
Class BackOffRetryStrategy
java.lang.Object
io.camunda.zeebe.scheduler.retry.BackOffRetryStrategy
- All Implemented Interfaces:
RetryStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrunWithRetry(OperationToRetry callable) Runs the given runnable with the defined retry strategy.runWithRetry(OperationToRetry callable, BooleanSupplier terminateCondition) Runs the given runnable with the defined retry strategy.
-
Constructor Details
-
BackOffRetryStrategy
-
-
Method Details
-
runWithRetry
Description copied from interface:RetryStrategyRuns 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:
runWithRetryin interfaceRetryStrategy- 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 terminateCondition) Description copied from interface:RetryStrategyRuns 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:
runWithRetryin interfaceRetryStrategy- Parameters:
callable- the callable which should be executedterminateCondition- 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
-