net.sf.farrago.runtime
Class FennelTupleIter
java.lang.Object
org.eigenbase.runtime.AbstractTupleIter
net.sf.farrago.runtime.FennelAbstractTupleIter
net.sf.farrago.runtime.FennelTupleIter
- All Implemented Interfaces:
- TupleIter, ClosableAllocation
public class FennelTupleIter
- extends FennelAbstractTupleIter
FennelTupleIter implements the TupleIter
interfaces by reading tuples from a Fennel ExecStream.
FennelTupleIter only deals with raw byte buffers; it delegates to a FennelTupleReader
object the responsibility to unmarshal individual fields.
FennelTupleIter's implementation of populateBuffer()
blocks.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/runtime/FennelTupleIter.java#7 $
- Author:
- John V. Sichi, Stephan Zuercher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
streamGraph
private final FennelStreamGraph streamGraph
streamHandle
private final FennelStreamHandle streamHandle
FennelTupleIter
public FennelTupleIter(FennelTupleReader tupleReader,
FennelStreamGraph streamGraph,
FennelStreamHandle streamHandle,
int bufferSize)
- Creates a new FennelTupleIter object.
- Parameters:
tupleReader
- FennelTupleReader to use to interpret Fennel datastreamGraph
- underlying FennelStreamGraphstreamHandle
- handle to underlying Fennel ExecStream that this
TupleIter reads frombufferSize
- number of bytes in buffer used for fetching from Fennel
restart
public void restart()
- Description copied from interface:
TupleIter
- Restarts this iterator, so that a subsequent call to
TupleIter.fetchNext()
returns the first element in the collection being
iterated.
- Specified by:
restart
in interface TupleIter
- Overrides:
restart
in class FennelAbstractTupleIter
closeAllocation
public void closeAllocation()
- Description copied from interface:
ClosableAllocation
- Closes this object.
populateBuffer
protected int populateBuffer()
- Blocking implementation of
populateBuffer()
.
- Specified by:
populateBuffer
in class FennelAbstractTupleIter
- Returns:
- number of bytes read into
FennelAbstractTupleIter.byteBuffer
or 0
for end of stream.