@InterfaceAudience.Public @InterfaceStability.Stable public class StreamBackedIterator<X extends Writable> extends Object implements ResetableIterator<X>
| Constructor and Description |
|---|
StreamBackedIterator() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(X item)
Add an element to the collection of elements to iterate over.
|
void |
clear()
Close datasources, but do not release internal resources.
|
void |
close()
Close datasources and release resources.
|
boolean |
hasNext()
True if a call to next may return a value.
|
boolean |
next(X val)
Assign next value to actual.
|
boolean |
replay(X val)
Assign last value returned to actual.
|
void |
reset()
Set iterator to return to the start of its range.
|
public StreamBackedIterator()
public boolean hasNext()
ResetableIteratorhasNext in interface ResetableIterator<X extends Writable>public boolean next(X val) throws IOException
ResetableIteratorResetableIterator.reset() (FIFO).
Note that a call to this may fail for nested joins (i.e. more elements
available, but none satisfying the constraints of the join)next in interface ResetableIterator<X extends Writable>IOExceptionpublic boolean replay(X val) throws IOException
ResetableIteratorreplay in interface ResetableIterator<X extends Writable>IOExceptionpublic void reset()
ResetableIteratorResetableIterator.add(T) to avoid a ConcurrentModificationException.reset in interface ResetableIterator<X extends Writable>public void add(X item) throws IOException
ResetableIteratoradd in interface ResetableIterator<X extends Writable>IOExceptionpublic void close() throws IOException
ResetableIteratorclose in interface ResetableIterator<X extends Writable>IOExceptionpublic void clear()
ResetableIteratorclear in interface ResetableIterator<X extends Writable>Copyright © 2017 Apache Software Foundation. All rights reserved.