RetryAsyncContextImpl
internal class RetryAsyncContextImpl(val config: RetryConfig, val eventFlow: MutableSharedFlow<RetryEvent>) : RetryAsyncContext(source)
Represents the asynchronous context implementation of a retry mechanism. Besides defining context behaviour, this implementation is also responsible for:
state management;
event emission.
For each retryable asynchronous operation, a new instance of this class must be created.
Parameters
config
The configuration for the retry mechanism.
eventFlow
The shared flow to emit retry events to.
See also
Properties
Functions
Link copied to clipboard
Handles an error that occurred during the asynchronous operation execution. Such handling may include deciding whether to retry the operation or ignore the error and complete the operation. This method might propagate the error if retrying is no longer possible (e.g., the maximum number of attempts was reached), and the caller did not specify a custom error handler.
Link copied to clipboard
Link copied to clipboard