Class Retry.DelayingRetryPolicy.Builder

java.lang.Object
io.helidon.faulttolerance.Retry.DelayingRetryPolicy.Builder
All Implemented Interfaces:
Builder<Retry.DelayingRetryPolicy.Builder,Retry.DelayingRetryPolicy>, Supplier<Retry.DelayingRetryPolicy>
Enclosing class:
Retry.DelayingRetryPolicy

public static class Retry.DelayingRetryPolicy.Builder extends Object implements Builder<Retry.DelayingRetryPolicy.Builder,Retry.DelayingRetryPolicy>
Fluent API builder for Retry.DelayingRetryPolicy.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public Retry.DelayingRetryPolicy build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<Retry.DelayingRetryPolicy.Builder,Retry.DelayingRetryPolicy>
      Returns:
      instance of the built type
    • calls

      public Retry.DelayingRetryPolicy.Builder calls(int calls)
      Total number of calls (first + retries).
      Parameters:
      calls - how many times to call the method
      Returns:
      updated builder instance
    • delay

      Base delay between the invocations.
      Parameters:
      delay - delay between the invocations
      Returns:
      updated builder instance
    • delayFactor

      public Retry.DelayingRetryPolicy.Builder delayFactor(double delayFactor)
      A delay multiplication factor.
      Parameters:
      delayFactor - a delay multiplication factor
      Returns:
      updated builder instance
    • config

      public Retry.DelayingRetryPolicy.Builder config(Config config)

      Load all properties for this circuit breaker from configuration.

      Configuration
      key default value description
      calls 3 Number of calls
      delay 200 millis Delay to wait between retries
      delay-factor 2 A delay multiplication factor
      Parameters:
      config - the config node to use
      Returns:
      updated builder instance