Class ExchangeSourceOperator

java.lang.Object
org.elasticsearch.compute.operator.SourceOperator
org.elasticsearch.compute.operator.exchange.ExchangeSourceOperator
All Implemented Interfaces:
Closeable, AutoCloseable, Operator, org.elasticsearch.core.Releasable

public class ExchangeSourceOperator extends SourceOperator
Source operator implementation that retrieves data from an ExchangeSource
  • Constructor Details

    • ExchangeSourceOperator

      public ExchangeSourceOperator(ExchangeSource source)
  • Method Details

    • getOutput

      public Page getOutput()
      Description copied from interface: Operator
      returns non-null if output page available. Only called when isFinished() == false
    • isFinished

      public boolean isFinished()
      Description copied from interface: Operator
      whether the operator has finished processing all input pages and made the corresponding output pages available
    • finish

      public void finish()
      Description copied from interface: Operator
      notifies the operator that it won't receive any more input pages
    • isBlocked

      public IsBlockedResult isBlocked()
      Description copied from interface: Operator
      An operator can be blocked on some action (e.g. waiting for some resources to become available). If so, it returns a future that completes when the operator becomes unblocked. If the operator is not blocked, this method returns Operator.NOT_BLOCKED which is an already completed future.
    • 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
      Overrides:
      canProduceMoreDataWithoutExtraInput in class SourceOperator
      Returns:
      true if the operator has buffered data that can produce output, false otherwise
    • close

      public void close()
      Description copied from interface: Operator
      notifies the operator that it won't be used anymore (i.e. none of the other methods called), and its resources can be cleaned up
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • status

      Description copied from interface: Operator
      The status of the operator.