Interface DelayablePolicy<R>

Type Parameters:
R - result type
All Superinterfaces:
Policy<R>
All Known Implementing Classes:
CircuitBreakerImpl, RetryPolicyImpl

public interface DelayablePolicy<R> extends Policy<R>
A policy that can be delayed between executions.
  • Method Summary

    Modifier and Type
    Method
    Description
    default Duration
    Returns a computed delay for the result and context else null if no delay function is configured or the computed delay is invalid.
    Returns the policy config.

    Methods inherited from interface dev.failsafe.Policy

    toExecutor
  • Method Details

    • getConfig

      DelayablePolicyConfig<R> getConfig()
      Description copied from interface: Policy
      Returns the policy config.
      Specified by:
      getConfig in interface Policy<R>
    • computeDelay

      default Duration computeDelay(ExecutionContext<R> context)
      Returns a computed delay for the result and context else null if no delay function is configured or the computed delay is invalid.