java.lang.Object
org.elasticsearch.compute.operator.SinkOperator
All Implemented Interfaces:
Closeable, AutoCloseable, Operator, org.elasticsearch.core.Releasable
Direct Known Subclasses:
ExchangeSinkOperator, OutputOperator, PageConsumerOperator

public abstract class SinkOperator extends Object implements Operator
A sink operator - accepts input, produces no output.
  • Constructor Details

    • SinkOperator

      public SinkOperator()
  • Method Details

    • getOutput

      public final Page getOutput()
      A sink operator produces no output - unconditionally throws UnsupportedOperationException
      Specified by:
      getOutput in interface Operator
    • canProduceMoreDataWithoutExtraInput

      public boolean canProduceMoreDataWithoutExtraInput()
      Description copied from interface: Operator
      Returns true if the operator can produce more output pages without requiring additional input pages. This is useful for operators that buffer data or have internal state that can produce multiple output pages.

      Operators that do not buffer data should return false - they cannot produce pages out of thin air. Examples of operators that may return true:

      • Operators with internal buffers (e.g., AsyncOperator with pending results)
      • Operators processing a single input page into multiple output pages
      • Aggregation operators that buffer partial results
      Specified by:
      canProduceMoreDataWithoutExtraInput in interface Operator
      Returns:
      true if the operator has buffered data that can produce output, false otherwise
    • doAddInput

      protected abstract void doAddInput(Page page)
    • addInput

      public final void addInput(Page page)
      Description copied from interface: Operator
      adds an input page to the operator. only called when needsInput() == true and isFinished() == false
      Specified by:
      addInput in interface Operator