org.teiid.dqp.internal.process
Class DataTierTupleSource

java.lang.Object
  extended by org.teiid.dqp.internal.process.DataTierTupleSource
All Implemented Interfaces:
TupleSource, DQPCore.CompletionListener<AtomicResultsMessage>

public class DataTierTupleSource
extends java.lang.Object
implements TupleSource, DQPCore.CompletionListener<AtomicResultsMessage>

This tuple source impl can only be used once; once it is closed, it cannot be reopened and reused. TODO: the handling of DataNotAvailable is awkward. In the multi-threaded case we'd like to not even notify the parent plan and just schedule the next poll.


Constructor Summary
DataTierTupleSource(AtomicRequestMessage aqr, RequestWorkItem workItem, ConnectorWork cwi, DataTierManagerImpl dtm, int limit)
           
 
Method Summary
 void cancelRequest()
           
 void closeSource()
          Closes the Tuple Source.
 void fullyCloseSource()
           
 AtomicRequestMessage getAtomicRequestMessage()
           
 java.lang.String getConnectorName()
           
 boolean isCanceled()
           
 boolean isDone()
           
 boolean isQueued()
           
 boolean isRunning()
           
 boolean isTransactional()
           
 java.util.List<?> nextTuple()
          Returns the next tuple
 void onCompletion(DQPCore.FutureWork<AtomicResultsMessage> future)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTierTupleSource

public DataTierTupleSource(AtomicRequestMessage aqr,
                           RequestWorkItem workItem,
                           ConnectorWork cwi,
                           DataTierManagerImpl dtm,
                           int limit)
Method Detail

nextTuple

public java.util.List<?> nextTuple()
                            throws TeiidComponentException,
                                   TeiidProcessingException
Description copied from interface: TupleSource
Returns the next tuple

Specified by:
nextTuple in interface TupleSource
Returns:
the next tuple (a List object), or null if there are no more tuples.
Throws:
TeiidComponentException - indicating a non-business exception such as a communication exception, or other such nondeterministic exception
TeiidProcessingException

isQueued

public boolean isQueued()

isDone

public boolean isDone()

isRunning

public boolean isRunning()

fullyCloseSource

public void fullyCloseSource()

isCanceled

public boolean isCanceled()

cancelRequest

public void cancelRequest()

closeSource

public void closeSource()
Description copied from interface: TupleSource
Closes the Tuple Source.

Specified by:
closeSource in interface TupleSource
See Also:
TupleSource.closeSource()

getAtomicRequestMessage

public AtomicRequestMessage getAtomicRequestMessage()

getConnectorName

public java.lang.String getConnectorName()

isTransactional

public boolean isTransactional()

onCompletion

public void onCompletion(DQPCore.FutureWork<AtomicResultsMessage> future)
Specified by:
onCompletion in interface DQPCore.CompletionListener<AtomicResultsMessage>


Copyright © 2011. All Rights Reserved.