Enum Class SpringAIErrorMapper.RetryStrategy
java.lang.Object
java.lang.Enum<SpringAIErrorMapper.RetryStrategy>
com.google.adk.models.springai.error.SpringAIErrorMapper.RetryStrategy
- All Implemented Interfaces:
Serializable, Comparable<SpringAIErrorMapper.RetryStrategy>, Constable
- Enclosing class:
SpringAIErrorMapper
public static enum SpringAIErrorMapper.RetryStrategy
extends Enum<SpringAIErrorMapper.RetryStrategy>
关于重试策略的建议。
-
嵌套类概述
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
枚举常量概述
Enum ConstantsEnum ConstantDescription使用指数级退避策略(exponential backoff)重新尝试。在修复了延迟问题后,重新尝试。立即重试(针对短暂的网络问题)请勿重试:该错误为永久性故障(即无法通过重试来解决问题)。 -
方法概述
Modifier and TypeMethodDescription返回该类中具有指定名称的枚举常量。static SpringAIErrorMapper.RetryStrategy[]values()返回一个数组,其中包含该枚举类中的所有常量,并按照它们被声明的顺序排列。
-
枚举常量详细信息
-
NO_RETRY
请勿重试:该错误为永久性故障(即无法通过重试来解决问题)。 -
EXPONENTIAL_BACKOFF
使用指数级退避策略(exponential backoff)重新尝试。 -
FIXED_DELAY
在修复了延迟问题后,重新尝试。 -
IMMEDIATE_RETRY
立即重试(针对短暂的网络问题)
-
-
方法详细信息(Method Details)
-
values
返回一个数组,其中包含该枚举类中的所有常量,并按照它们被声明的顺序排列。- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
返回该类中具有指定名称的枚举常量。 该字符串必须与指定的名称完全匹配。 确切地;准确地 这是一个用于在该类中声明枚举常量的标识符。(不允许使用多余的空白字符。)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-