Class AsyncConnectorSourceOperatorFactory

java.lang.Object
org.elasticsearch.xpack.esql.datasources.AsyncConnectorSourceOperatorFactory
All Implemented Interfaces:
Describable, Operator.OperatorFactory, SourceOperator.SourceOperatorFactory

public class AsyncConnectorSourceOperatorFactory extends Object implements SourceOperator.SourceOperatorFactory
Source-operator factory that executes a connector query on a background thread and feeds pages into an AsyncExternalSourceBuffer for the driver to consume.

Two execution modes, selected based on whether a ExternalSliceQueue is supplied:

The producer runs as a flat state machine (see runProducerLoop(org.elasticsearch.xpack.esql.datasources.AsyncConnectorSourceOperatorFactory.ProducerState, org.elasticsearch.action.ActionListener<java.lang.Void>)) driven by a single ProducerState instance — no CPS recursion, no per-split trampoline. The drain is fully non-blocking: it runs synchronously while the buffer has space and yields the producer thread when full, resuming via the executor when space is freed.
See Also: