|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.rdf.inf.JustificationIterator
public class JustificationIterator
Iterator visits Justifications reading from the justification index.
The iterator optionally supports asynchronous read ahead.
| Field Summary | |
|---|---|
static int |
MAXIMUM_CAPACITY
Deprecated. The maximum #of statements that will be buffered by the iterator. |
| Fields inherited from interface com.bigdata.rdf.inf.IJustificationIterator |
|---|
log |
| Fields inherited from interface com.bigdata.striterator.IChunkedIterator |
|---|
DEFAULT_CHUNK_SIZE |
| Constructor Summary | |
|---|---|
JustificationIterator(IIndex ndx,
int capacity,
boolean async)
Deprecated. Create an iterator reading from the justifications index. |
|
| Method Summary | |
|---|---|
void |
close()
Deprecated. Closes the iterator, releasing any associated resources. |
boolean |
hasNext()
Deprecated. |
Justification |
next()
Deprecated. The next element available from the iterator. |
Justification[] |
nextChunk()
Deprecated. Returns a chunk whose size is the #of statements currently in the buffer. |
void |
remove()
Deprecated. Removes the last element visited by IChunkedIterator.next() (optional operation). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final transient int MAXIMUM_CAPACITY
| Constructor Detail |
|---|
public JustificationIterator(IIndex ndx,
int capacity,
boolean async)
capacity - The maximum #of statements that will be buffered. When ZERO
(0) the iterator will range count the access path fully buffer
if there are less than MAXIMUM_CAPACITY statements
selected by the triple pattern. When non-zero, the caller's
value is used - this gives you control when you really, really
want to have something fully buffered, e.g., for an in-memory
self-join.async - When true, asynchronous read-ahead will be used to refill the
buffer as it becomes depleted. When false, read-ahead will be
synchronous (this is useful when you want to read at most N
statements from the index).| Method Detail |
|---|
public boolean hasNext()
hasNext in interface Iterator<Justification>public Justification next()
IChunkedIterator
next in interface IChunkedIterator<Justification>next in interface Iterator<Justification>public Justification[] nextChunk()
Note: When asynchronous reads are used, the buffer will be transparently refilled and should be ready for a next chunk by the time you are done with this one.
nextChunk in interface IChunkedIterator<Justification>public void remove()
IChunkedIteratorIChunkedIterator.next() (optional operation).
Note: This method is not readily suited for use with IChunkedIterator.nextChunk()
since the latter has already visited everything in the chunk and
IChunkedIterator.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 IChunkedIterator<Justification>remove in interface Iterator<Justification>UnsupportedOperationException - alwayspublic void close()
ICloseableIterator
Note: Implementations that support Iterator.remove() MUST NOT
eagerly close the iterator when it is exhausted since that would make it
impossible to remove the last visited statement. Instead they MUST wait
for an explicit ICloseableIterator.close() by the application.
close in interface ICloseableIterator<Justification>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||