类 ExecutionConfig.Builder
java.lang.Object
io.agentscope.core.model.ExecutionConfig.Builder
- 封闭类:
ExecutionConfig
Builder for ExecutionConfig.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明backoffMultiplier(Double backoffMultiplier) Sets the backoff multiplier applied after each retry.build()Builds a new ExecutionConfig instance.initialBackoff(Duration initialBackoff) Sets the initial backoff duration for the first retry.maxAttempts(Integer maxAttempts) Sets the maximum number of attempts (including the initial attempt).maxBackoff(Duration maxBackoff) Sets the maximum backoff duration between retries.Sets the predicate to determine if an error should trigger a retry.Sets the timeout duration for a single execution.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
timeout
Sets the timeout duration for a single execution.- 参数:
timeout- the timeout duration, or null for no timeout- 返回:
- this builder instance
-
maxAttempts
Sets the maximum number of attempts (including the initial attempt).For example, maxAttempts=3 means: 1 initial attempt + 2 retries.
- 参数:
maxAttempts- the max attempts (must be >= 1), or null- 返回:
- this builder instance
-
initialBackoff
Sets the initial backoff duration for the first retry.- 参数:
initialBackoff- the initial backoff duration, or null- 返回:
- this builder instance
-
maxBackoff
Sets the maximum backoff duration between retries.- 参数:
maxBackoff- the max backoff duration, or null- 返回:
- this builder instance
-
backoffMultiplier
Sets the backoff multiplier applied after each retry.For example, with initialBackoff=1s, maxBackoff=10s, and backoffMultiplier=2.0, the retry delays will be: 1s, 2s, 4s, 8s, 10s (capped), 10s, ...
- 参数:
backoffMultiplier- the backoff multiplier (must be >= 1.0), or null- 返回:
- this builder instance
-
retryOn
Sets the predicate to determine if an error should trigger a retry.- 参数:
retryOn- the retry predicate (returns true to retry), or null- 返回:
- this builder instance
-
build
Builds a new ExecutionConfig instance.- 返回:
- a new ExecutionConfig instance
-