Interface RetryOperations
- All Known Subinterfaces:
CircuitBreakerOperations
public interface RetryOperations
Programmatic retry operations.
- Since:
- 5.0.0
- Author:
- graemerocher
-
Method Summary
Modifier and TypeMethodDescription<T> TExecutes synchronous work with retry.<T> CompletionStage<T> executeCompletionStage(Supplier<? extends CompletionStage<T>> supplier) Executes asynchronous work backed by a completion stage with retry.<T> Publisher<T> executePublisher(Supplier<? extends Publisher<T>> supplier) Executes reactive work backed by a publisher with retry.
-
Method Details
-
execute
Executes synchronous work with retry.- Type Parameters:
T- The result type- Parameters:
supplier- The supplier to invoke for each attempt- Returns:
- The computed result
-
executeCompletionStage
Executes asynchronous work backed by a completion stage with retry.- Type Parameters:
T- The result type- Parameters:
supplier- The supplier that creates a new completion stage for each attempt- Returns:
- A completion stage representing the retried execution
-
executePublisher
Executes reactive work backed by a publisher with retry.- Type Parameters:
T- The emitted type- Parameters:
supplier- The supplier that creates a new publisher for each attempt- Returns:
- A publisher representing the retried execution
-