net.sf.farrago.runtime
Class FennelTransformTupleIter
java.lang.Object
org.eigenbase.runtime.AbstractTupleIter
net.sf.farrago.runtime.FennelAbstractTupleIter
net.sf.farrago.runtime.FennelTransformTupleIter
- All Implemented Interfaces:
- TupleIter, ClosableAllocation
public class FennelTransformTupleIter
- extends FennelAbstractTupleIter
FennelTransformTupleIter implements the TupleIter
interfaces by reading tuples from a Fennel
JavaTransformExecStream.
FennelTransformTupleIter only deals with raw byte buffers; it delegates to
a FennelTupleReader
object the responsibility to unmarshal individual
fields.
FennelTransformTupleIter's implementation of populateBuffer()
does not block.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/runtime/FennelTransformTupleIter.java#7 $
- Author:
- Stephan Zuercher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
execStreamInputOrdinal
private final int execStreamInputOrdinal
streamGraph
private final FennelStreamGraph streamGraph
streamHandle
private final FennelStreamHandle streamHandle
inputStreamHandle
private final FennelStreamHandle inputStreamHandle
FennelTransformTupleIter
public FennelTransformTupleIter(FennelTupleReader tupleReader,
FennelStreamGraph streamGraph,
FennelStreamHandle streamHandle,
FennelStreamHandle inputStreamHandle,
int inputOrdinal,
int bufferSize)
- Creates a new FennelTransformTupleIter object.
- Parameters:
tupleReader
- FennelTupleReader to use to interpret Fennel datastreamGraph
- underlying FennelStreamGraphstreamHandle
- handle to underlying Fennel JavaTransformExecStreaminputStreamHandle
- handle to the Fennel ExecStream that this
TupleIter reads from -- used only for resetinputOrdinal
- the input stream's ordinal in the underlying
JavaTransformExecStreambufferSize
- 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()
- Non-blocking implementation of
FennelTupleIter.populateBuffer()
.
- Specified by:
populateBuffer
in class FennelAbstractTupleIter
- Returns:
- number of bytes read into
FennelAbstractTupleIter.byteBuffer
, 0
for end of stream, less than 0 for no data available