TransferRetryPolicy
Defined in: src/transfers/TransferEngine.ts:65
Retry policy for transfer execution.
Use createDefaultRetryPolicy for a production-ready policy with
exponential backoff, full jitter, and Retry-After support, or implement
the hooks directly for full control.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
maxAttempts? | number | Maximum total attempts, including the first attempt. Defaults to 1. | src/transfers/TransferEngine.ts:67 |
Methods
Section titled “Methods”getDelayMs()?
Section titled “getDelayMs()?”optional getDelayMs(input: TransferRetryDecisionInput): number;Defined in: src/transfers/TransferEngine.ts:77
Computes the delay before the next attempt in milliseconds.
The engine sleeps for the returned duration with an abort-aware timer: cancelling the job during the delay rejects immediately instead of waiting out the backoff. Non-positive or missing values retry at once.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input | TransferRetryDecisionInput |
Returns
Section titled “Returns”number
onRetry()?
Section titled “onRetry()?”optional onRetry(input: TransferRetryDecisionInput): void;Defined in: src/transfers/TransferEngine.ts:79
Observes retry decisions before the next attempt starts.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input | TransferRetryDecisionInput |
Returns
Section titled “Returns”void
shouldRetry()?
Section titled “shouldRetry()?”optional shouldRetry(input: TransferRetryDecisionInput): boolean;Defined in: src/transfers/TransferEngine.ts:69
Decides whether a failed attempt should be retried. Defaults to SDK retryability metadata.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input | TransferRetryDecisionInput |
Returns
Section titled “Returns”boolean