Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RetryPolicy

A policy for retry execution.

Hierarchy

  • RetryPolicy

Index

Methods

delay

  • delay(failure: Throwable | Error, retryCount: number): number
  • Compute a delay in milliseconds before retry is executed.

    Parameters

    • failure: Throwable | Error
    • retryCount: number

    Returns number

Static constantDelay

  • Create a constant delay retry policy.

    Parameters

    • delay: number

    Returns RetryPolicy

Static exponentialDelayWithJitter

  • exponentialDelayWithJitter(initialDelay: number, maxDelay: number): RetryPolicy
  • Create an exponential delay with jitter retry policy.

    Based on Full Jitter in Exponential Backoff And Jitter.

    Parameters

    • initialDelay: number
    • maxDelay: number

    Returns RetryPolicy

Static linearDelay

  • linearDelay(initialDelay: number, maxDelay: number): RetryPolicy
  • Create a linear delay retry policy.

    Parameters

    • initialDelay: number
    • maxDelay: number

    Returns RetryPolicy

Generated using TypeDoc