Interface Retrier


public interface Retrier
Retry executor implementation
  • Method Details

    • asState

      @Nonnull Retrier.RetryState asState()
      Returns:
      new Retrier.RetryState
    • asReactor

      @Nonnull reactor.util.retry.Retry asReactor()
      Returns:
      new Retry implementation for Project Reactor retry handling
    • retry

      void retry(@Nonnull Runnable runnable) throws RetryAttemptException
      Parameters:
      runnable - to execute for successful completion
      Throws:
      RetryAttemptException - if exhausted all attempts
    • retry

      <T> T retry(@Nonnull Supplier<T> supplier) throws RetryAttemptException
      Type Parameters:
      T - type of value
      Parameters:
      supplier - to use for value extraction
      Returns:
      value is succeeded
      Throws:
      RetryAttemptException - if exhausted all attempts
    • retry

      <T> T retry(@Nonnull Supplier<T> supplier, Supplier<T> fallback)
      Type Parameters:
      T - type of value
      Parameters:
      supplier - to use for value extraction
      fallback - to use for value if failed to retrieve value from supplier
      Returns:
      value is succeeded