Class AsyncRetries.Builder

java.lang.Object
com.google.genai.gaos.utils.AsyncRetries.Builder
Enclosing class:
AsyncRetries

public static final class AsyncRetries.Builder extends Object
  • Method Details

    • 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(List<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(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.
    • build

      public AsyncRetries build()