Package org.teiid.common.buffer
Interface IndexedTupleSource
-
- All Superinterfaces:
TupleSource
- All Known Implementing Classes:
AbstractTupleSource
,BatchIterator
,TupleBuffer.TupleBufferTupleSource
public interface IndexedTupleSource extends TupleSource
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getCurrentIndex()
Get the current position.boolean
hasNext()
void
mark()
Save the current position that can be restored with a call toreset()
void
reset()
Restore the previous mark and set the mark back to the first position.void
setPosition(long position)
Set the tuple source position-
Methods inherited from interface org.teiid.common.buffer.TupleSource
closeSource, nextTuple
-
-
-
-
Method Detail
-
hasNext
boolean hasNext() throws TeiidComponentException, TeiidProcessingException
- Returns:
- true if there are more tuples
- Throws:
TeiidComponentException
TeiidProcessingException
-
mark
void mark() throws TeiidComponentException
Save the current position that can be restored with a call toreset()
- Throws:
TeiidComponentException
-
reset
void reset()
Restore the previous mark and set the mark back to the first position.
-
setPosition
void setPosition(long position)
Set the tuple source position- Parameters:
position
-
-
getCurrentIndex
long getCurrentIndex()
Get the current position. The position is 1 based and reports the position of the tuple that will be retrieved with a call toTupleSource.nextTuple()
- Returns:
-
-