Asynchronous I/O#

AsyncDataStream#

AsyncDataStream.unordered_wait(data_stream, ...)

Adds an async function to the data stream.

AsyncDataStream.unordered_wait_with_retry(...)

Adds an async function with an AsyncRetryStrategy to support retry of AsyncFunction to the data stream.

AsyncDataStream.ordered_wait(data_stream, ...)

Adds an async function to the data stream.

AsyncDataStream.ordered_wait_with_retry(...)

Adds an async function with an AsyncRetryStrategy to support retry of AsyncFunction to the data stream.

AsyncFunction#

AsyncFunction.async_invoke(value)

Trigger async operation for each stream input.

AsyncFunction.timeout(value)

In case async_invoke() timeout occurred.

AsyncRetryStrategy#

AsyncRetryStrategy.can_retry(current_attempts)

Whether the next attempt can happen.

AsyncRetryStrategy.get_backoff_time_millis(...)

The delay time of next attempt.

AsyncRetryStrategy.get_retry_predicate()

Returns the defined retry predicate.

AsyncRetryStrategy.no_restart()

AsyncRetryStrategy.fixed_delay(max_attempts, ...)

AsyncRetryStrategy.exponential_backoff(...)

AsyncRetryPredicate#

AsyncRetryPredicate.result_predicate()

An optional Python predicate function that defines a condition on asyncFunction's future result which will trigger a later reattempt operation, will be called before user's ResultFuture#complete.

AsyncRetryPredicate.exception_predicate()

An optional Python predicate function that defines a condition on asyncFunction's exception which will trigger a later reattempt operation, will be called before user's ResultFuture#complete_exceptionally.

Async Retry Predicates Utilities#