Annotation Interface Resilience.Retry

Enclosing class:
Resilience

@Documented @Retention(RUNTIME) @Target({}) public static @interface Resilience.Retry
Retry policy configuration.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Initial backoff delay in milliseconds.
    boolean
    Whether to add jitter to backoff.
    int
    Maximum retry attempts.
    int
    Maximum backoff delay in milliseconds.
    double
    Backoff multiplier for exponential backoff.
    Class<? extends Throwable>[]
    Exception types to NOT retry on.
    Class<? extends Throwable>[]
    Exception types to retry on.
  • Element Details

    • maxAttempts

      int maxAttempts
      Maximum retry attempts.

      0 means no retries.

      Default:
      0
    • backoffMs

      int backoffMs
      Initial backoff delay in milliseconds.
      Default:
      1000
    • multiplier

      double multiplier
      Backoff multiplier for exponential backoff.

      1.0 means constant delay.

      Default:
      2.0
    • maxBackoffMs

      int maxBackoffMs
      Maximum backoff delay in milliseconds.
      Default:
      30000
    • retryOn

      Class<? extends Throwable>[] retryOn
      Exception types to retry on.

      Empty means retry on all exceptions.

      Default:
      {}
    • noRetryOn

      Class<? extends Throwable>[] noRetryOn
      Exception types to NOT retry on.
      Default:
      {}
    • jitter

      boolean jitter
      Whether to add jitter to backoff.
      Default:
      true