Class AsyncRetries.Builder

  • Enclosing class:
    AsyncRetries

    public static final class AsyncRetries.Builder
    extends java.lang.Object
    • Method Detail

      • retryConfig

        public AsyncRetries.Builder retryConfig​(RetryConfig retryConfig)
        Defines the retry configuration.
        Parameters:
        retryConfig - The retry configuration to use.
        Returns:
        The builder instance.
      • statusCodes

        public AsyncRetries.Builder statusCodes​(java.util.List<java.lang.String> statusCodes)
        Defines the status codes that should be considered as errors.
        Parameters:
        statusCodes - The list of status codes to treat as errors.
        Returns:
        The builder instance.
      • scheduler

        public AsyncRetries.Builder scheduler​(java.util.concurrent.ScheduledExecutorService scheduler)
        Defines the scheduler that will be used to schedule and execute retry attempts. Recommend using a globally shared executor for this.
        Parameters:
        scheduler - An instance of ScheduledExecutorService
        Returns:
        The builder instance.