public interface AsyncFunction<IN,OUT>
For each asyncInvoke an async io operation can be triggered, and once it has been done, the result can be collected by calling AsyncCollector.collect. For each async operation, its context is stored in the operator immediately after invoking asyncInvoke, avoiding blocking for each stream input as long as the internal buffer is not full.
AsyncCollector
can be passed into callbacks or futures to collect the result data.
An error can also be propagate to the async IO operator by
AsyncCollector.collect(Throwable)
.
Modifier and Type | Method and Description |
---|---|
void |
asyncInvoke(IN input,
AsyncCollector<OUT> collector)
Trigger the async operation for each stream input
|
void asyncInvoke(IN input, AsyncCollector<OUT> collector)
input
- element coming from an upstream taskcollector
- to collect the result dataCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.