public abstract class ProcessorPlan extends Object implements Cloneable, BatchCollector.BatchProducer
This class represents a processor plan. It is generic in that it abstracts the interface to the plan by the processor, meaning that the actual implementation of the plan or the types of processing done by the plan is not important to the processor.
All the implementations of this interface need to implement clone()
method. The plan is only clonable in the pre or post-processing stage, not
during the processing state (things like program state, result sets, etc).
It's only safe to clone in between query processings. In other words, it's
only safe to call clone() before the call to open() or after
the call to close().
| Constructor and Description |
|---|
ProcessorPlan() |
| Modifier and Type | Method and Description |
|---|---|
void |
addWarning(TeiidException warning) |
abstract ProcessorPlan |
clone()
Return a safe clone of the ProcessorPlan.
|
abstract void |
close()
Close the plan after processing.
|
TupleBuffer |
getBuffer(int maxRows)
return the final tuple buffer or null if not available
|
CommandContext |
getContext()
Get the processor context, which can be modified.
|
PlanNode |
getDescriptionProperties() |
abstract List |
getOutputElements()
Get list of resolved elements describing output columns for this plan.
|
boolean |
hasBuffer()
Return true if the plan provides a final buffer via getBuffer
|
void |
initialize(CommandContext context,
ProcessorDataManager dataMgr,
BufferManager bufferMgr)
Initialize the plan with some required pieces of data for making
queries.
|
abstract TupleBatch |
nextBatch()
Get a batch of results or possibly an Exception.
|
abstract void |
open()
Open the plan for processing.
|
Boolean |
requiresTransaction(boolean transactionalReads) |
void |
reset()
Reset a plan so that it can be processed again.
|
void |
setContext(CommandContext context) |
public void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr)
context - Process execution contextdataMgr - Data manager referencebufferMgr - Buffer manager referencepublic void addWarning(TeiidException warning)
public void reset()
public abstract List getOutputElements()
getOutputElements in interface BatchCollector.BatchProducerpublic CommandContext getContext()
public void setContext(CommandContext context)
public abstract void open()
throws TeiidComponentException,
TeiidProcessingException
public abstract TupleBatch nextBatch() throws BlockedException, TeiidComponentException, TeiidProcessingException
nextBatch in interface BatchCollector.BatchProducerBlockedException - indicating next batch is not available yetTeiidComponentException - for non-business rule exceptionTeiidProcessingException - for business rule exception, related
to user input or modelingpublic abstract void close()
throws TeiidComponentException
close in interface BatchCollector.BatchProducerTeiidComponentExceptionpublic abstract ProcessorPlan clone()
public Boolean requiresTransaction(boolean transactionalReads)
public PlanNode getDescriptionProperties()
public TupleBuffer getBuffer(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException
getBuffer in interface BatchCollector.BatchProducerTeiidProcessingExceptionTeiidComponentExceptionBlockedExceptionpublic boolean hasBuffer()
hasBuffer in interface BatchCollector.BatchProducerCopyright © 2018 JBoss by Red Hat. All rights reserved.