com.metamatrix.query.processor
Class QueryProcessor

java.lang.Object
  extended by com.metamatrix.query.processor.QueryProcessor

public class QueryProcessor
extends java.lang.Object

TODO: combine overlapping responsibilities with RequestWorkItem


Nested Class Summary
static interface QueryProcessor.BatchHandler
           
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.
 java.util.List<java.lang.Exception> getAndClearWarnings()
           
 CommandContext getContext()
           
 int getHighestRow()
           
 java.lang.Object getProcessID()
           
 ProcessorPlan getProcessorPlan()
           
 TupleSourceID getResultsID()
           
 void process()
          Process fully blocking
 boolean process(long time)
          Process until time expires or a BlockedException occurs
 void requestCanceled()
          Asynch shutdown of the QueryProcessor, which may trigger exceptions in the processing thread
 void requestClosed()
          Asynch graceful shutdown of the QueryProcessor
 void setBatchHandler(QueryProcessor.BatchHandler batchHandler)
           
 
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 MetaMatrixComponentException
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:
MetaMatrixComponentException
Method Detail

getContext

public CommandContext getContext()

getProcessID

public java.lang.Object getProcessID()

getResultsID

public TupleSourceID getResultsID()

getProcessorPlan

public ProcessorPlan getProcessorPlan()

process

public void process()
             throws BlockedException,
                    MetaMatrixCoreException
Process fully blocking

Throws:
MetaMatrixCoreException
BlockedException

process

public boolean process(long time)
                throws BlockedException,
                       MetaMatrixCoreException
Process until time expires or a BlockedException occurs

Parameters:
time -
Returns:
Throws:
BlockedException
MetaMatrixCoreException

closeProcessing

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

Throws:
MetaMatrixComponentException
TupleSourceNotFoundException

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


requestClosed

public void requestClosed()
Asynch graceful shutdown of the QueryProcessor


setBatchHandler

public void setBatchHandler(QueryProcessor.BatchHandler batchHandler)

getHighestRow

public int getHighestRow()


Copyright © 2009. All Rights Reserved.