-
public interface StreamRetryProcessorStrategy-based retry executor used inside the Stream SDK.
A concrete implementation applies the supplied policy to repeatedly invoke the suspending operation until the call succeeds, the retry policy decides to give up, or the surrounding coroutine is cancelled.
Success → returns
Result.success(value)from the first successful attempt.Give-up / max retries → returns
Result.failure(originalThrowable).Cancellation → re-throws
CancellationException; the caller is responsible for handling it.
Implementations must honour the timing and stop-conditions described by StreamRetryPolicy (initial delay, back-off function,
giveUpFunction, etc.).
-
-
Method Summary
Modifier and Type Method Description abstract <T extends Any> Result<T>retry(StreamRetryPolicy policy, SuspendFunction1<StreamRetryAttemptInfo, T> block)Executes block with the supplied policy, retrying on failure. -
-
Method Detail
-
retry
abstract <T extends Any> Result<T> retry(StreamRetryPolicy policy, SuspendFunction1<StreamRetryAttemptInfo, T> block)
- Parameters:
policy- Retry/back-off parameters (exponential, linear, custom).block- The suspending operation to execute.
-
-
-
-