Class PageConsumerOperator

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

public class PageConsumerOperator extends SinkOperator
Sink operator that's useful for passing off pages to a Consumer.
  • Constructor Details

    • PageConsumerOperator

      public PageConsumerOperator(Consumer<Page> pageConsumer)
  • Method Details

    • 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
    • needsInput

      public boolean needsInput()
      Description copied from interface: Operator
      whether the given operator can accept more input pages
    • doAddInput

      protected void doAddInput(Page page)
      Specified by:
      doAddInput in class SinkOperator
    • 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