Module org.elasticsearch.compute
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
Source operator implementation that retrieves data from an
ExchangeSource-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic classNested classes/interfaces inherited from class org.elasticsearch.compute.operator.SourceOperator
SourceOperator.ShardLoad, SourceOperator.SourceOperatorFactoryNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory -
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 TypeMethodDescriptionbooleanReturns true if the operator can produce more output pages without requiring additional input pages.voidclose()notifies the operator that it won't be used anymore (i.e.voidfinish()notifies the operator that it won't receive any more input pagesreturns non-null if output page available.An operator can be blocked on some action (e.g.booleanwhether the operator has finished processing all input pages and made the corresponding output pages availablestatus()The status of the operator.toString()Methods inherited from class org.elasticsearch.compute.operator.SourceOperator
addInput, needsInput, shardLoadDelta
-
Constructor Details
-
ExchangeSourceOperator
-
-
Method Details
-
getOutput
Description copied from interface:Operatorreturns non-null if output page available. Only called when isFinished() == false -
isFinished
public boolean isFinished()Description copied from interface:Operatorwhether the operator has finished processing all input pages and made the corresponding output pages available -
finish
public void finish()Description copied from interface:Operatornotifies the operator that it won't receive any more input pages -
isBlocked
Description copied from interface:OperatorAn 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 returnsOperator.NOT_BLOCKEDwhich is an already completed future. -
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- Overrides:
canProduceMoreDataWithoutExtraInputin classSourceOperator- Returns:
trueif the operator has buffered data that can produce output,falseotherwise
- Operators with internal buffers (e.g.,
-
close
public void close()Description copied from interface:Operatornotifies 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
-
status
Description copied from interface:OperatorThe status of the operator.
-