RetryConfig

data class RetryConfig(val maxAttempts: Int = DEFAULT_MAX_ATTEMPTS, val initialDelay: Duration = DEFAULT_INITIAL_DELAY, val maxDelay: Duration = DEFAULT_MAX_DELAY, val backoffFactor: Double = DEFAULT_BACKOFF_FACTOR, val jitter: Double = DEFAULT_JITTER, val exceptions: List<String>? = null)

How a node is retried when it raises.

Constructors

Link copied to clipboard
constructor(maxAttempts: Int = DEFAULT_MAX_ATTEMPTS, initialDelay: Duration = DEFAULT_INITIAL_DELAY, maxDelay: Duration = DEFAULT_MAX_DELAY, backoffFactor: Double = DEFAULT_BACKOFF_FACTOR, jitter: Double = DEFAULT_JITTER, exceptions: List<String>? = null)

Types

Link copied to clipboard
class Builder

Fluent builder for RetryConfig, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Multiplier applied to the delay after each attempt.

Link copied to clipboard

Reported type names to retry on, matched exactly with no subclass match. The reported name is the failure's own simple name, or for a NodeExecutionException the wrapped failure's type name -- so list e.g. "RuntimeError", not "NodeExecutionException". Null retries any failure; an empty list retries none.

Link copied to clipboard

Delay before the first retry.

Link copied to clipboard

Randomness factor, not a duration: the delay is spread over delay * (1 +/- jitter). Zero removes randomness.

Link copied to clipboard

Attempts including the first, so 0 or 1 means no retry.

Link copied to clipboard

Ceiling on any single delay.

Functions

Link copied to clipboard

Returns initialDelay in whole milliseconds. Java cannot read it (mangled).

Link copied to clipboard

Returns maxDelay in whole milliseconds. Java cannot read it (mangled).

Link copied to clipboard

Returns a Builder initialized with this instance's properties, primarily for Java callers. Prefer it over copy from Java: copy takes every property positionally, so its signature changes whenever a property is added.