Package com.google.genai.gaos.utils
Class AsyncRetries.Builder
java.lang.Object
com.google.genai.gaos.utils.AsyncRetries.Builder
- Enclosing class:
- AsyncRetries
-
Method Summary
Modifier and TypeMethodDescriptionbuild()retryConfig(RetryConfig retryConfig) Defines the retry configuration.scheduler(ScheduledExecutorService scheduler) Defines the scheduler that will be used to schedule and execute retry attempts.statusCodes(List<String> statusCodes) Defines the status codes that should be considered as errors.
-
Method Details
-
retryConfig
Defines the retry configuration.- Parameters:
retryConfig- The retry configuration to use.- Returns:
- The builder instance.
-
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
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 ofScheduledExecutorService- Returns:
- The builder instance.
-
build
-