Package io.trino.operator
Class AbstractRowChangeOperator
- java.lang.Object
-
- io.trino.operator.AbstractRowChangeOperator
-
- All Implemented Interfaces:
Operator,AutoCloseable
- Direct Known Subclasses:
DeleteOperator,UpdateOperator
public abstract class AbstractRowChangeOperator extends Object implements Operator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractRowChangeOperator.State
-
Field Summary
Fields Modifier and Type Field Description protected longrowCountprotected AbstractRowChangeOperator.Statestate-
Fields inherited from interface io.trino.operator.Operator
NOT_BLOCKED
-
-
Constructor Summary
Constructors Constructor Description AbstractRowChangeOperator(OperatorContext operatorContext)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidaddInput(Page page)Adds an input page to the operator.voidclose()This method will always be called before releasing the Operator reference.voidfinish()Notifies the operator that no more pages will be added and the operator should finish processing and flush results.OperatorContextgetOperatorContext()PagegetOutput()Gets an output page from the operator.com.google.common.util.concurrent.ListenableFuture<?>isBlocked()Returns a future that will be completed when the operator becomes unblocked.booleanisFinished()Is this operator completely finished processing and no more output pages will be produced.booleanneedsInput()Returns true if and only if this operator can accept an input page.protected UpdatablePageSourcepageSource()voidsetPageSource(Supplier<Optional<UpdatablePageSource>> pageSource)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.trino.operator.Operator
finishMemoryRevoke, startMemoryRevoke
-
-
-
-
Field Detail
-
state
protected AbstractRowChangeOperator.State state
-
rowCount
protected long rowCount
-
-
Constructor Detail
-
AbstractRowChangeOperator
public AbstractRowChangeOperator(OperatorContext operatorContext)
-
-
Method Detail
-
getOperatorContext
public OperatorContext getOperatorContext()
- Specified by:
getOperatorContextin interfaceOperator
-
finish
public void finish()
Description copied from interface:OperatorNotifies the operator that no more pages will be added and the operator should finish processing and flush results. This method will not be called if the Task is already failed or canceled.
-
isFinished
public boolean isFinished()
Description copied from interface:OperatorIs this operator completely finished processing and no more output pages will be produced.- Specified by:
isFinishedin interfaceOperator
-
needsInput
public boolean needsInput()
Description copied from interface:OperatorReturns true if and only if this operator can accept an input page.- Specified by:
needsInputin interfaceOperator
-
addInput
public abstract void addInput(Page page)
Description copied from interface:OperatorAdds an input page to the operator. This method will only be called ifneedsInput()returns true.
-
isBlocked
public com.google.common.util.concurrent.ListenableFuture<?> isBlocked()
Description copied from interface:OperatorReturns a future that will be completed when the operator becomes unblocked. If the operator is not blocked, this method should returnNOT_BLOCKED.
-
getOutput
public Page getOutput()
Description copied from interface:OperatorGets an output page from the operator. If no output data is currently available, return null.
-
close
public void close()
Description copied from interface:OperatorThis method will always be called before releasing the Operator reference.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceOperator
-
setPageSource
public void setPageSource(Supplier<Optional<UpdatablePageSource>> pageSource)
-
pageSource
protected UpdatablePageSource pageSource()
-
-