Class ModelRetryInterceptor.Builder
java.lang.Object
com.alibaba.cloud.ai.graph.agent.interceptor.modelretry.ModelRetryInterceptor.Builder
- Enclosing class:
- ModelRetryInterceptor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbackoffMultiplier(double backoffMultiplier) Set the backoff factor (the multiplier for the delay time on each retry).build()initialDelay(long initialDelay) Set the initial retry delay (milliseconds).maxAttempts(int maxAttempts) Set the maximum number of retries (including the first call).maxDelay(long maxDelay) Set the maximum retry delay (milliseconds).retryableExceptionPredicate(Predicate<Exception> predicate) Configure custom retryable exception handling logic
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
maxAttempts
Set the maximum number of retries (including the first call).- Parameters:
maxAttempts- The maximum number of attempts must be >= 1.
-
initialDelay
Set the initial retry delay (milliseconds).- Parameters:
initialDelay- Initial delay time, in milliseconds
-
maxDelay
Set the maximum retry delay (milliseconds).- Parameters:
maxDelay- Maximum delay time, in milliseconds
-
backoffMultiplier
Set the backoff factor (the multiplier for the delay time on each retry).- Parameters:
backoffMultiplier- The retreat factor must be >= 1.0
-
retryableExceptionPredicate
Configure custom retryable exception handling logic- Parameters:
predicate- Exception detection function
-
build
-