@PublicEvolving public class AsyncDataStream extends Object
AsyncFunction to a data stream.
DataStream<String> input = ...
AsyncFunction<String, Tuple<String, String>> asyncFunc = ...
AsyncDataStream.orderedWait(input, asyncFunc, timeout, TimeUnit.MILLISECONDS, 100);
| Modifier and Type | Class and Description |
|---|---|
static class |
AsyncDataStream.OutputMode
Output mode for asynchronous operations.
|
| Constructor and Description |
|---|
AsyncDataStream() |
| Modifier and Type | Method and Description |
|---|---|
static <IN,OUT> SingleOutputStreamOperator<OUT> |
orderedWait(DataStream<IN> in,
AsyncFunction<IN,OUT> func,
long timeout,
TimeUnit timeUnit)
Adds an AsyncWaitOperator.
|
static <IN,OUT> SingleOutputStreamOperator<OUT> |
orderedWait(DataStream<IN> in,
AsyncFunction<IN,OUT> func,
long timeout,
TimeUnit timeUnit,
int capacity)
Adds an AsyncWaitOperator.
|
static <IN,OUT> SingleOutputStreamOperator<OUT> |
orderedWaitWithRetry(DataStream<IN> in,
AsyncFunction<IN,OUT> func,
long timeout,
TimeUnit timeUnit,
AsyncRetryStrategy<OUT> asyncRetryStrategy)
Adds an AsyncWaitOperator with an AsyncRetryStrategy to support retry of AsyncFunction.
|
static <IN,OUT> SingleOutputStreamOperator<OUT> |
orderedWaitWithRetry(DataStream<IN> in,
AsyncFunction<IN,OUT> func,
long timeout,
TimeUnit timeUnit,
int capacity,
AsyncRetryStrategy<OUT> asyncRetryStrategy)
Adds an AsyncWaitOperator with an AsyncRetryStrategy to support retry of AsyncFunction.
|
static <IN,OUT> SingleOutputStreamOperator<OUT> |
unorderedWait(DataStream<IN> in,
AsyncFunction<IN,OUT> func,
long timeout,
TimeUnit timeUnit)
Adds an AsyncWaitOperator.
|
static <IN,OUT> SingleOutputStreamOperator<OUT> |
unorderedWait(DataStream<IN> in,
AsyncFunction<IN,OUT> func,
long timeout,
TimeUnit timeUnit,
int capacity)
Adds an AsyncWaitOperator.
|
static <IN,OUT> SingleOutputStreamOperator<OUT> |
unorderedWaitWithRetry(DataStream<IN> in,
AsyncFunction<IN,OUT> func,
long timeout,
TimeUnit timeUnit,
AsyncRetryStrategy<OUT> asyncRetryStrategy)
Adds an AsyncWaitOperator with an AsyncRetryStrategy to support retry of AsyncFunction.
|
static <IN,OUT> SingleOutputStreamOperator<OUT> |
unorderedWaitWithRetry(DataStream<IN> in,
AsyncFunction<IN,OUT> func,
long timeout,
TimeUnit timeUnit,
int capacity,
AsyncRetryStrategy<OUT> asyncRetryStrategy)
Adds an AsyncWaitOperator with an AsyncRetryStrategy to support retry of AsyncFunction.
|
public static <IN,OUT> SingleOutputStreamOperator<OUT> unorderedWait(DataStream<IN> in, AsyncFunction<IN,OUT> func, long timeout, TimeUnit timeUnit, int capacity)
IN - Type of input recordOUT - Type of output recordin - Input DataStreamfunc - AsyncFunctiontimeout - for the asynchronous operation to completetimeUnit - of the given timeoutcapacity - The max number of async i/o operation that can be triggeredSingleOutputStreamOperator.public static <IN,OUT> SingleOutputStreamOperator<OUT> unorderedWait(DataStream<IN> in, AsyncFunction<IN,OUT> func, long timeout, TimeUnit timeUnit)
IN - Type of input recordOUT - Type of output recordin - Input DataStreamfunc - AsyncFunctiontimeout - for the asynchronous operation to completetimeUnit - of the given timeoutSingleOutputStreamOperator.public static <IN,OUT> SingleOutputStreamOperator<OUT> orderedWait(DataStream<IN> in, AsyncFunction<IN,OUT> func, long timeout, TimeUnit timeUnit, int capacity)
IN - Type of input recordOUT - Type of output recordin - Input DataStreamfunc - AsyncFunctiontimeout - for the asynchronous operation to completetimeUnit - of the given timeoutcapacity - The max number of async i/o operation that can be triggeredSingleOutputStreamOperator.public static <IN,OUT> SingleOutputStreamOperator<OUT> orderedWait(DataStream<IN> in, AsyncFunction<IN,OUT> func, long timeout, TimeUnit timeUnit)
IN - Type of input recordOUT - Type of output recordin - Input DataStreamfunc - AsyncFunctiontimeout - for the asynchronous operation to completetimeUnit - of the given timeoutSingleOutputStreamOperator.public static <IN,OUT> SingleOutputStreamOperator<OUT> unorderedWaitWithRetry(DataStream<IN> in, AsyncFunction<IN,OUT> func, long timeout, TimeUnit timeUnit, AsyncRetryStrategy<OUT> asyncRetryStrategy)
IN - Type of input recordOUT - Type of output recordin - Input DataStreamfunc - AsyncFunctiontimeout - from first invoke to final completion of asynchronous operation, may include
multiple retries, and will be reset in case of restarttimeUnit - of the given timeoutasyncRetryStrategy - The strategy of reattempt async i/o operation that can be triggeredSingleOutputStreamOperator.public static <IN,OUT> SingleOutputStreamOperator<OUT> unorderedWaitWithRetry(DataStream<IN> in, AsyncFunction<IN,OUT> func, long timeout, TimeUnit timeUnit, int capacity, AsyncRetryStrategy<OUT> asyncRetryStrategy)
IN - Type of input recordOUT - Type of output recordin - Input DataStreamfunc - AsyncFunctiontimeout - from first invoke to final completion of asynchronous operation, may include
multiple retries, and will be reset in case of restarttimeUnit - of the given timeoutcapacity - The max number of async i/o operation that can be triggeredasyncRetryStrategy - The strategy of reattempt async i/o operation that can be triggeredSingleOutputStreamOperator.public static <IN,OUT> SingleOutputStreamOperator<OUT> orderedWaitWithRetry(DataStream<IN> in, AsyncFunction<IN,OUT> func, long timeout, TimeUnit timeUnit, AsyncRetryStrategy<OUT> asyncRetryStrategy)
IN - Type of input recordOUT - Type of output recordin - Input DataStreamfunc - AsyncFunctiontimeout - from first invoke to final completion of asynchronous operation, may include
multiple retries, and will be reset in case of restarttimeUnit - of the given timeoutasyncRetryStrategy - The strategy of reattempt async i/o operation that can be triggeredSingleOutputStreamOperator.public static <IN,OUT> SingleOutputStreamOperator<OUT> orderedWaitWithRetry(DataStream<IN> in, AsyncFunction<IN,OUT> func, long timeout, TimeUnit timeUnit, int capacity, AsyncRetryStrategy<OUT> asyncRetryStrategy)
IN - Type of input recordOUT - Type of output recordin - Input DataStreamfunc - AsyncFunctiontimeout - from first invoke to final completion of asynchronous operation, may include
multiple retries, and will be reset in case of restarttimeUnit - of the given timeoutcapacity - The max number of async i/o operation that can be triggeredasyncRetryStrategy - The strategy of reattempt async i/o operation that can be triggeredSingleOutputStreamOperator.Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.