org.eigenbase.runtime
Class AbstractTupleIter
java.lang.Object
org.eigenbase.runtime.AbstractTupleIter
- All Implemented Interfaces:
- TupleIter, ClosableAllocation
- Direct Known Subclasses:
- CompoundParallelTupleIter, CompoundTupleIter.Test.BoxTupleIter, FennelAbstractTupleIter, MedMockTupleIter, RestartableCollectionTupleIter, RestartableIteratorTupleIter, ResultSetTupleIter, TimeoutQueueTupleIterTest.TickIterator
public abstract class AbstractTupleIter
- extends Object
- implements TupleIter
A base class for implementations of TupleIter, with default
implementations of some of its methods.
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/runtime/AbstractTupleIter.java#4 $
- Author:
- Marc Berkowitz
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTupleIter
public AbstractTupleIter()
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