org.teiid.query.processor
Class BatchIterator
java.lang.Object
org.teiid.common.buffer.AbstractTupleSource
org.teiid.query.processor.BatchIterator
- All Implemented Interfaces:
- IndexedTupleSource, TupleSource
public class BatchIterator
- extends AbstractTupleSource
A BatchIterator provides an iterator interface to a BatchCollector.BatchProducer.
By setting #setBuffer(TupleBuffer),
the iterator can copy on read into a TupleBuffer for repeated reading.
Note that the saveOnMark buffering only lasts until the next mark is set.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BatchIterator
public BatchIterator(BatchCollector.BatchProducer source)
getBatch
protected TupleBatch getBatch(int row)
throws TeiidComponentException,
TeiidProcessingException
- Specified by:
getBatch in class AbstractTupleSource
- Throws:
TeiidComponentException
TeiidProcessingException
finalRow
protected java.util.List<?> finalRow()
throws TeiidComponentException,
TeiidProcessingException
- Specified by:
finalRow in class AbstractTupleSource
- Throws:
TeiidComponentException
TeiidProcessingException
getCurrentTuple
protected java.util.List<?> getCurrentTuple()
throws TeiidComponentException,
BlockedException,
TeiidProcessingException
- Overrides:
getCurrentTuple in class AbstractTupleSource
- Throws:
TeiidComponentException
BlockedException
TeiidProcessingException
available
public int available()
- Specified by:
available in class AbstractTupleSource
setBuffer
public void setBuffer(TupleBuffer buffer,
boolean saveOnMark)
closeSource
public void closeSource()
- Description copied from interface:
TupleSource
- Closes the Tuple Source.
- Specified by:
closeSource in interface TupleSource- Overrides:
closeSource in class AbstractTupleSource
reset
public void reset()
- Description copied from interface:
IndexedTupleSource
- Restore the previous mark and set the mark back to the first position.
- Specified by:
reset in interface IndexedTupleSource- Overrides:
reset in class AbstractTupleSource
mark
public void mark()
- Description copied from interface:
IndexedTupleSource
- Save the current position that can be restored with a call to
IndexedTupleSource.reset()
- Specified by:
mark in interface IndexedTupleSource- Overrides:
mark in class AbstractTupleSource
setPosition
public void setPosition(int position)
- Description copied from interface:
IndexedTupleSource
- Set the tuple source position
- Specified by:
setPosition in interface IndexedTupleSource- Overrides:
setPosition in class AbstractTupleSource
Copyright © 2010. All Rights Reserved.