Interface Retry

All Superinterfaces:
FtHandler, RuntimeType.Api<RetryConfig>

public interface Retry extends FtHandler, RuntimeType.Api<RetryConfig>
Retry supports retry policies to be applied on an execution of asynchronous tasks.
  • Method Details

    • create

      static Retry create(RetryConfig retryConfig)
      Create a new retry from its configuration.
      Parameters:
      retryConfig - configuration of the retry to create
      Returns:
      a new retry
    • create

      static Retry create(Consumer<RetryConfig.Builder> builderConsumer)
      Create a new retry with customized configuration.
      Parameters:
      builderConsumer - consumer of builder
      Returns:
      a new retry customized through builder
    • builder

      static RetryConfig.Builder builder()
      Create a new retry fluent API builder.
      Returns:
      a new builder
    • retryCounter

      long retryCounter()
      Number of times a method called has been retried. This is a monotonically increasing counter over the lifetime of the handler.
      Returns:
      number ot times a method is retried.