Interface RetryOperations

All Known Subinterfaces:
CircuitBreakerOperations

public interface RetryOperations
Programmatic retry operations.
Since:
5.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    execute(Supplier<T> supplier)
    Executes synchronous work with retry.
    Executes asynchronous work backed by a completion stage with retry.
    <T> org.reactivestreams.Publisher<T>
    executePublisher(Supplier<? extends org.reactivestreams.Publisher<T>> supplier)
    Executes reactive work backed by a publisher with retry.
  • Method Details

    • execute

      <T> T execute(Supplier<T> supplier)
      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

      <T> CompletionStage<T> executeCompletionStage(Supplier<? extends CompletionStage<T>> supplier)
      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

      <T> org.reactivestreams.Publisher<T> executePublisher(Supplier<? extends org.reactivestreams.Publisher<T>> supplier)
      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