com.bigdata.rdf.inf
Class JustificationIterator

java.lang.Object
  extended by com.bigdata.rdf.inf.JustificationIterator
All Implemented Interfaces:
IJustificationIterator, IChunkedIterator<Justification>, ICloseableIterator<Justification>, Iterator<Justification>

Deprecated. replace with appropriate access path reading on the justifications index for SPORelation (or treat as a secondary relation).

public class JustificationIterator
extends Object
implements IJustificationIterator

Iterator visits Justifications reading from the justification index. The iterator optionally supports asynchronous read ahead.

Version:
$Id: JustificationIterator.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

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

MAXIMUM_CAPACITY

public static final transient int MAXIMUM_CAPACITY
Deprecated. 
The maximum #of statements that will be buffered by the iterator.

See Also:
Constant Field Values
Constructor Detail

JustificationIterator

public JustificationIterator(IIndex ndx,
                             int capacity,
                             boolean async)
Deprecated. 
Create an iterator reading from the justifications index.

Parameters:
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

hasNext

public boolean hasNext()
Deprecated. 
Specified by:
hasNext in interface Iterator<Justification>

next

public Justification next()
Deprecated. 
Description copied from interface: IChunkedIterator
The next element available from the iterator.

Specified by:
next in interface IChunkedIterator<Justification>
Specified by:
next in interface Iterator<Justification>

nextChunk

public Justification[] nextChunk()
Deprecated. 
Returns a chunk whose size is the #of statements currently in the buffer.

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.

Specified by:
nextChunk in interface IChunkedIterator<Justification>
Returns:
The next chunk.

remove

public void remove()
Deprecated. 
Description copied from interface: IChunkedIterator
Removes the last element visited by IChunkedIterator.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.

Specified by:
remove in interface IChunkedIterator<Justification>
Specified by:
remove in interface Iterator<Justification>
Throws:
UnsupportedOperationException - always

close

public void close()
Deprecated. 
Description copied from interface: ICloseableIterator
Closes the iterator, releasing any associated resources. This method MAY be invoked safely if the iterator is already closed.

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.

Specified by:
close in interface ICloseableIterator<Justification>


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.