java.lang.Object
org.elasticsearch.compute.operator.SinkOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,org.elasticsearch.core.Releasable
- Direct Known Subclasses:
ExchangeSinkOperator,OutputOperator,PageConsumerOperator
A sink operator - accepts input, produces no output.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA factory for creating sink operators.Nested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory, Operator.Status -
Field Summary
Fields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidadds an input page to the operator.booleanReturns true if the operator can produce more output pages without requiring additional input pages.protected abstract voiddoAddInput(Page page) final PageA sink operator produces no output - unconditionally throws UnsupportedOperationExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.compute.operator.Operator
close, finish, isBlocked, isFinished, needsInput, status
-
Constructor Details
-
SinkOperator
public SinkOperator()
-
-
Method Details
-
getOutput
A sink operator produces no output - unconditionally throws UnsupportedOperationException -
canProduceMoreDataWithoutExtraInput
public boolean canProduceMoreDataWithoutExtraInput()Description copied from interface:OperatorReturns 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 returntrue:- Operators with internal buffers (e.g.,
AsyncOperatorwith pending results) - Operators processing a single input page into multiple output pages
- Aggregation operators that buffer partial results
- Specified by:
canProduceMoreDataWithoutExtraInputin interfaceOperator- Returns:
trueif the operator has buffered data that can produce output,falseotherwise
- Operators with internal buffers (e.g.,
-
doAddInput
-
addInput
Description copied from interface:Operatoradds an input page to the operator. only called when needsInput() == true and isFinished() == false
-