org.eigenbase.runtime
Class CalcTupleIter
java.lang.Object
org.eigenbase.runtime.CalcTupleIter
- All Implemented Interfaces:
- TupleIter, ClosableAllocation
- Direct Known Subclasses:
- NestedLoopCalcTupleIter
public abstract class CalcTupleIter
- extends Object
- implements TupleIter
CalcTupleIter
is an abstract base for iterator implementations
generated by IterCalcRel
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
inputIterator
protected TupleIter inputIterator
CalcTupleIter
protected CalcTupleIter(TupleIter inputIterator)
- Constructor.
- Parameters:
inputIterator
- iterator producing results to be transformed
setTimeout
public boolean setTimeout(long timeout,
boolean asUnderflow)
- Description copied from interface:
TupleIter
- Sets a timeout for
TupleIter.fetchNext()
; (optional operation). Not
all implementing classes support a timeout. For those that do, this
method provides a common interface, For those that do not, the adapter
TimeoutQueueTupleIter
puts a timeout queue on top.
- Specified by:
setTimeout
in interface TupleIter
- Parameters:
timeout
- in milliseconds. 0 means poll, infinity means block.asUnderflow
- true means indicate timeout by returning TupleIter.NoDataReason.UNDERFLOW
; false means throw TupleIter.TimeoutException
on a timeout.
- Returns:
- true if the timeout was set, false if the implementing class does
not support a timeout.
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
closeAllocation
public void closeAllocation()
- Description copied from interface:
ClosableAllocation
- Closes this object.
- Specified by:
closeAllocation
in interface ClosableAllocation