eu.larkc.core.query
Class GraphResultBase.BlockingQueueIterator

java.lang.Object
  extended by eu.larkc.core.query.GraphResultBase.BlockingQueueIterator
All Implemented Interfaces:
CloseableIterator<org.openrdf.model.Statement>, java.util.Iterator<org.openrdf.model.Statement>
Enclosing class:
GraphResultBase

public class GraphResultBase.BlockingQueueIterator
extends java.lang.Object
implements CloseableIterator<org.openrdf.model.Statement>

Helper class to iterate the blocking queue used to simulate asynchrnous streaming of RDF statements.

Author:
vassil

Constructor Summary
GraphResultBase.BlockingQueueIterator()
           
 
Method Summary
 void close()
          Closes the current iterator and all subsequent operations will raise exception.
 boolean hasNext()
          Checks whether the next result could be returned.
 boolean isClosed()
          Verifies if the current iterator is closed.
 org.openrdf.model.Statement next()
          Fetches the next result from the iterator.
 void remove()
          Removes the current item from the iterated collection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphResultBase.BlockingQueueIterator

public GraphResultBase.BlockingQueueIterator()
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: CloseableIterator
Checks whether the next result could be returned.

Specified by:
hasNext in interface CloseableIterator<org.openrdf.model.Statement>
Specified by:
hasNext in interface java.util.Iterator<org.openrdf.model.Statement>
Returns:
whether a next item is available

next

public org.openrdf.model.Statement next()
Description copied from interface: CloseableIterator
Fetches the next result from the iterator.

Specified by:
next in interface CloseableIterator<org.openrdf.model.Statement>
Specified by:
next in interface java.util.Iterator<org.openrdf.model.Statement>
Returns:
the next item

remove

public void remove()
Description copied from interface: CloseableIterator
Removes the current item from the iterated collection. This method may be not implemented.

Specified by:
remove in interface CloseableIterator<org.openrdf.model.Statement>
Specified by:
remove in interface java.util.Iterator<org.openrdf.model.Statement>

close

public void close()
Description copied from interface: CloseableIterator
Closes the current iterator and all subsequent operations will raise exception. The method could be invoked many times.

Specified by:
close in interface CloseableIterator<org.openrdf.model.Statement>

isClosed

public boolean isClosed()
Description copied from interface: CloseableIterator
Verifies if the current iterator is closed.

Specified by:
isClosed in interface CloseableIterator<org.openrdf.model.Statement>
Returns:
is closed