Interface Retry

All Superinterfaces:
FtHandler, RuntimeType.Api<io.helidon.faulttolerance.RetryConfig>

@Contract public interface Retry extends FtHandler, RuntimeType.Api<io.helidon.faulttolerance.RetryConfig>
Retry supports retry policies to be applied on an execution of asynchronous tasks.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    A retry policy that prolongs the delays between retries by a defined factor.
    static class 
    A retry policy that randomizes delays between execution using a "jitter" time.
    static interface 
    Retry policy to handle delays between retries.
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.helidon.faulttolerance.RetryConfig.Builder
    Create a new retry fluent API builder.
    static Retry
    create(io.helidon.faulttolerance.RetryConfig retryConfig)
    Create a new retry from its configuration.
    static Retry
    create(Consumer<io.helidon.faulttolerance.RetryConfig.Builder> builderConsumer)
    Create a new retry with customized configuration.
    long
    Number of times a method called has been retried.

    Methods inherited from interface io.helidon.faulttolerance.FtHandler

    invoke, name

    Methods inherited from interface io.helidon.builder.api.RuntimeType.Api

    prototype
  • Method Details

    • create

      static Retry create(io.helidon.faulttolerance.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<io.helidon.faulttolerance.RetryConfig.Builder> builderConsumer)
      Create a new retry with customized configuration.
      Parameters:
      builderConsumer - consumer of builder
      Returns:
      a new retry customized through builder
    • builder

      static io.helidon.faulttolerance.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.