RichAsyncFunction

abstract class RichAsyncFunction[IN, OUT] extends AbstractRichFunction with AsyncFunction[IN, OUT]

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 is not supported since the aggregator may be modified by multiple threads.

Type parameters:
IN

The type of the input value.

OUT

The type of the output value.

trait AsyncFunction[IN, OUT]
class AbstractRichFunction
trait RichFunction
trait Function
trait Serializable
class Object
trait Matchable
class Any

Value members

Inherited methods

def asyncInvoke(input: IN, resultFuture: ResultFuture[OUT]): Unit

Trigger the async operation for each stream input

Trigger the async operation for each stream input

Value parameters:
input

element coming from an upstream task

resultFuture

to be completed with the result data

Inherited from:
AsyncFunction
@throws(java.lang.Exception)
def close(): Unit
Inherited from:
AbstractRichFunction
def getIterationRuntimeContext(): IterationRuntimeContext
Inherited from:
AbstractRichFunction
def getRuntimeContext(): RuntimeContext
Inherited from:
AbstractRichFunction
@throws(java.lang.Exception)
def open(x$0: Configuration): Unit
Inherited from:
AbstractRichFunction
def setRuntimeContext(x$0: RuntimeContext): Unit
Inherited from:
AbstractRichFunction
def timeout(input: IN, resultFuture: ResultFuture[OUT]): Unit

AsyncFunction.asyncInvoke timeout occurred. By default, the result future is exceptionally completed with a timeout exception.

AsyncFunction.asyncInvoke timeout occurred. By default, the result future is exceptionally completed with a timeout exception.

Value parameters:
input

element coming from an upstream task

resultFuture

to be completed with the result data

Inherited from:
AsyncFunction