High-performance asynchronous I/O operations for external system integration with configurable parallelism, timeouts, and result ordering.
import org.apache.flink.streaming.api.scala._
import org.apache.flink.streaming.api.scala.async.{AsyncFunction, AsyncCollector}
import java.util.concurrent.TimeUnitobject AsyncDataStream {
def unorderedWait[IN, OUT: TypeInformation](
input: DataStream[IN],
asyncFunction: AsyncFunction[IN, OUT],
timeout: Long,
timeUnit: TimeUnit
): DataStream[OUT]
def orderedWait[IN, OUT: TypeInformation](
input: DataStream[IN],
asyncFunction: AsyncFunction[IN, OUT],
timeout: Long,
timeUnit: TimeUnit
): DataStream[OUT]
}trait AsyncFunction[IN, OUT] {
def asyncInvoke(input: IN, collector: AsyncCollector[OUT]): Unit
}
trait AsyncCollector[OUT] {
def collect(result: Iterable[OUT]): Unit
def collect(throwable: Throwable): Unit
}Enables non-blocking I/O operations for database lookups, REST API calls, and other external system interactions.