public class JustificationIterator extends Object implements IJustificationIterator
Justifications reading from the justification index.
The iterator optionally supports asynchronous read ahead.DEFAULT_CHUNK_SIZE| Constructor and Description |
|---|
JustificationIterator(IIndexManager indexManager,
IIndex ndx,
int capacity)
Deprecated.
Create an iterator reading from the justifications index.
|
| Modifier and Type | Method and Description |
|---|---|
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). |
public JustificationIterator(IIndexManager indexManager, IIndex ndx, int capacity)
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.public boolean hasNext()
hasNext in interface Iterator<Justification>public Justification next()
IChunkedIteratornext 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()
ICloseableIteratorICloseableIterator.close() if Iterator.hasNext()
method returns false to ensure that the iterator is closed
(and its resources release) as soon as it is exhausted.
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 ICloseableclose in interface ICloseableIterator<Justification>Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.