Packages

package async

Type Members

  1. trait AsyncFunction[IN, OUT] extends Function

    A function to trigger async I/O operations.

    A function to trigger async I/O operations.

    For each asyncInvoke an async io operation can be triggered, and once it has been done, the result can be collected by calling ResultFuture.complete. 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.

    ResultFuture can be passed into callbacks or futures to collect the result data. An error can also be propagate to the async IO operator by ResultFuture.completeExceptionally(Throwable).

    IN

    The type of the input element

    OUT

    The type of the output elements

    Annotations
    @PublicEvolving()
  2. class JavaResultFutureWrapper[OUT] extends ResultFuture[OUT]

    Internal wrapper class to map a Flink's Java API org.apache.flink.streaming.api.functions.async.ResultFuture to a Scala org.apache.flink.api.async.ResultFuture.

    Internal wrapper class to map a Flink's Java API org.apache.flink.streaming.api.functions.async.ResultFuture to a Scala org.apache.flink.api.async.ResultFuture.

    OUT

    type of the output elements

    Annotations
    @Internal()
  3. trait ResultFuture[OUT] extends AnyRef

    The result future collects data/errors from the user code while processing asynchronous I/O operations.

    The result future collects data/errors from the user code while processing asynchronous I/O operations.

    OUT

    type of the output element

    Annotations
    @PublicEvolving()
  4. abstract class RichAsyncFunction[IN, OUT] extends AbstractRichFunction with AsyncFunction[IN, OUT]

    Rich variant of AsyncFunction.

    Rich variant of AsyncFunction. As a org.apache.flink.api.common.functions.RichFunction, it gives access to the org.apache.flink.api.common.functions.RuntimeContext and provides setup and teardown methods.

    State related apis in org.apache.flink.api.common.functions.RuntimeContext are not supported yet because the key may get changed while accessing states in the working thread.

    org.apache.flink.api.common.functions.IterationRuntimeContext#getIterationAggregator(String) is not supported since the aggregator may be modified by multiple threads.

    IN

    The type of the input value.

    OUT

    The type of the output value.

  5. final class ScalaRichAsyncFunctionWrapper[IN, OUT] extends flink.streaming.api.functions.async.RichAsyncFunction[IN, OUT]

    A wrapper function that exposes a Scala RichAsyncFunction as a Java Rich Async Function.

    A wrapper function that exposes a Scala RichAsyncFunction as a Java Rich Async Function.

    The Scala and Java RichAsyncFunctions differ in their type of "ResultFuture"

    • Scala RichAsyncFunction: org.apache.flink.api.async.ResultFuture
    • Java RichAsyncFunction: org.apache.flink.streaming.api.functions.async.ResultFuture

Ungrouped