org.teiid.query.processor
Class QueryProcessor

java.lang.Object
  extended by org.teiid.query.processor.QueryProcessor
All Implemented Interfaces:
BatchCollector.BatchProducer

public class QueryProcessor
extends java.lang.Object
implements BatchCollector.BatchProducer


Nested Class Summary
static class QueryProcessor.ExpiredTimeSliceException
           
static interface QueryProcessor.ProcessorFactory
           
 
Constructor Summary
QueryProcessor(ProcessorPlan plan, CommandContext context, BufferManager bufferMgr, ProcessorDataManager dataMgr)
          Construct a processor with all necessary information to process.
 
Method Summary
 void closeProcessing()
          Close processing and clean everything up.
 BatchCollector createBatchCollector()
           
 TupleBuffer createTupleBuffer()
           
 java.util.List<java.lang.Exception> getAndClearWarnings()
           
 CommandContext getContext()
           
 java.util.List getOutputElements()
          Get list of resolved elements describing output columns for this plan.
 java.lang.Object getProcessID()
           
 ProcessorPlan getProcessorPlan()
           
 TupleBatch nextBatch()
          Get a batch of results or possibly an Exception.
 void requestCanceled()
          Asynch shutdown of the QueryProcessor, which may trigger exceptions in the processing thread
 void setNonBlocking(boolean nonBlocking)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryProcessor

public QueryProcessor(ProcessorPlan plan,
                      CommandContext context,
                      BufferManager bufferMgr,
                      ProcessorDataManager dataMgr)
               throws TeiidComponentException
Construct a processor with all necessary information to process.

Parameters:
plan - The plan to process
context - The context that this plan is being processed in
bufferMgr - The buffer manager that provides access to tuple sources
dataMgr - The data manager that provides access to get data
Throws:
TeiidComponentException
Method Detail

getContext

public CommandContext getContext()

getProcessID

public java.lang.Object getProcessID()

getProcessorPlan

public ProcessorPlan getProcessorPlan()

nextBatch

public TupleBatch nextBatch()
                     throws BlockedException,
                            TeiidProcessingException,
                            TeiidComponentException
Description copied from interface: BatchCollector.BatchProducer
Get a batch of results or possibly an Exception.

Specified by:
nextBatch in interface BatchCollector.BatchProducer
Returns:
Batch of results
Throws:
BlockedException - indicating next batch is not available yet
TeiidProcessingException - for business rule exception, related to user input or modeling
TeiidComponentException - for non-business rule exception

closeProcessing

public void closeProcessing()
Close processing and clean everything up. Should only be called by the same thread that called process.


getOutputElements

public java.util.List getOutputElements()
Description copied from interface: BatchCollector.BatchProducer
Get list of resolved elements describing output columns for this plan.

Specified by:
getOutputElements in interface BatchCollector.BatchProducer
Returns:
List of SingleElementSymbol

getAndClearWarnings

public java.util.List<java.lang.Exception> getAndClearWarnings()

requestCanceled

public void requestCanceled()
Asynch shutdown of the QueryProcessor, which may trigger exceptions in the processing thread


createTupleBuffer

public TupleBuffer createTupleBuffer()
                              throws TeiidComponentException
Throws:
TeiidComponentException

createBatchCollector

public BatchCollector createBatchCollector()
                                    throws TeiidComponentException
Throws:
TeiidComponentException

setNonBlocking

public void setNonBlocking(boolean nonBlocking)


Copyright © 2010. All Rights Reserved.