|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
E - The generic type for the [E]lements visited by the
Iterator.public interface IChunkedIterator<E>
An iterator that is able visit items in chunks. The elements in the chunk
will be in the same order that they would be visited by
Iterator.next(). The size of the chunk is up to the implementation.
Note: Chunked iterators are designed to make it easier to write methods that
use the batch APIs but do not require the data that will be visited by the
iterator to be fully materialized. You can use nextChunk() instead
of Iterator.next() to break down the operation into N chunks, where N
is determined dynamically based on how much data the iterator returns in each
chunk and how much data there is to be read.
IChunkedIterators are being closed within a
finally clause.| Field Summary | |
|---|---|
static int |
DEFAULT_CHUNK_SIZE
The default chunk size. |
| Method Summary | |
|---|---|
E |
next()
The next element available from the iterator. |
E[] |
nextChunk()
Return the next "chunk" from the iterator. |
void |
remove()
Removes the last element visited by next() (optional operation). |
| Methods inherited from interface com.bigdata.striterator.ICloseableIterator |
|---|
close |
| Methods inherited from interface java.util.Iterator |
|---|
hasNext |
| Field Detail |
|---|
static final int DEFAULT_CHUNK_SIZE
| Method Detail |
|---|
E next()
next in interface Iterator<E>NoSuchElementException - if the iterator is exhausted.E[] nextChunk()
NoSuchElementException - if the iterator is exhausted.void remove()
next() (optional operation).
Note: This method is not readily suited for use with nextChunk()
since the latter has already visited everything in the chunk and
remove() would only remove the last item in the chunk. Normally
you will want to accumulate items to be removed in a buffer and then
submit the buffer to some batch api operation when it overflows.
Alternatively, the IRangeQuery.REMOVEALL flag may be used with
the source iterator to remove elements from the index as they are
visited.
remove in interface Iterator<E>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||