Class RetryConfig
java.lang.Object
com.google.adk.workflow.RetryConfig
How a node is retried when it fails. The builder initializes each property to its
DEFAULT_ constant, except exceptions(), which starts unset.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe default forbackoffFactor().static final DurationThe default forinitialDelay().static final doubleThe default forjitter().static final intThe default formaxAttempts().static final DurationThe default formaxDelay(). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract doubleReturns the multiplier applied to the delay after each attempt.static RetryConfig.Builderbuilder()Returns the simple type names of the failures to retry on, matched exactly with no subclass match.abstract DurationReturns the delay before the first retry.abstract doublejitter()Returns the randomness factor, not a duration: the delay is spread overdelay * (1 +/- jitter).abstract intReturns the maximum number of attempts, including the first, so 0 or 1 means no retry.abstract DurationmaxDelay()Returns the ceiling on any single delay.abstract RetryConfig.Builder
-
Field Details
-
DEFAULT_MAX_ATTEMPTS
-
DEFAULT_INITIAL_DELAY
The default forinitialDelay(). -
DEFAULT_MAX_DELAY
The default formaxDelay(). -
DEFAULT_BACKOFF_FACTOR
-
DEFAULT_JITTER
-
-
Constructor Details
-
RetryConfig
public RetryConfig()
-
-
Method Details
-
maxAttempts
public abstract int maxAttempts()Returns the maximum number of attempts, including the first, so 0 or 1 means no retry. -
initialDelay
Returns the delay before the first retry. -
maxDelay
Returns the ceiling on any single delay. -
backoffFactor
public abstract double backoffFactor()Returns the multiplier applied to the delay after each attempt. -
jitter
public abstract double jitter()Returns the randomness factor, not a duration: the delay is spread overdelay * (1 +/- jitter). Zero removes randomness. -
exceptions
-
builder
-
toBuilder
-