Package com.google.genai.gaos.utils
Class RetryConfig.Builder
java.lang.Object
com.google.genai.gaos.utils.RetryConfig.Builder
- Enclosing class:
- RetryConfig
-
Method Summary
Modifier and TypeMethodDescriptionattemptCountBackoff(int maxRetries, BackoffStrategy backoff) Selects and configures the attempt-count backoff retry strategy.backoff()Selects the default backoff retry strategy.backoff(BackoffStrategy backoff) Selects and configures the backoff retry strategy.build()enable()Enables the selected strategy.enable(boolean enable) Enables or disables the selected strategy.Disables retries (sets strategy to "none").
-
Method Details
-
noRetries
Disables retries (sets strategy to "none").- Returns:
- The builder instance.
-
enable
Enables the selected strategy.- Returns:
- The builder instance.
-
enable
Enables or disables the selected strategy.- Parameters:
enable- Whether to enable the current strategy.- Returns:
- The builder instance.
-
backoff
Selects and configures the backoff retry strategy.- Parameters:
backoff- The backoff strategy to use.- Returns:
- The builder instance.
-
backoff
Selects the default backoff retry strategy.- Returns:
- The builder instance.
-
attemptCountBackoff
Selects and configures the attempt-count backoff retry strategy.- Parameters:
maxRetries- The maximum retry attempts after the initial request.backoff- The backoff strategy to use.- Returns:
- The builder instance.
-
build
-