Package com.stardog.stark.query.io
Class AsyncGraphQueryResult
java.lang.Object
com.google.common.collect.UnmodifiableIterator<Statement>
com.google.common.collect.AbstractIterator<Statement>
com.complexible.common.base.CloseableIterator.AbstractCloseableIterator<Statement>
com.stardog.stark.query.io.AsyncGraphQueryResult
- All Implemented Interfaces:
CloseableIterator<Statement>,GraphQueryResult,QueryResult<Statement>,AutoCloseable,Iterator<Statement>
public class AsyncGraphQueryResult
extends CloseableIterator.AbstractCloseableIterator<Statement>
implements GraphQueryResult
A
GraphQueryResult which asynchronously parses the result set from an input stream.- Author:
- Pavel Klinov
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.complexible.common.base.CloseableIterator
CloseableIterator.AbstractCloseableIterator<T>, CloseableIterator.DelegatingCloseableIterator<T>, CloseableIterator.EmptyCloseableIterator<T> -
Constructor Summary
ConstructorsConstructorDescriptionAsyncGraphQueryResult(InputStream input, RDFParser parser, Options parserOptions, ExecutorService execService, int batchSize, CancelCheck cancelCheck, Consumer<Boolean> onClose, Function<Exception, RuntimeException> onError) -
Method Summary
Methods inherited from class com.google.common.collect.AbstractIterator
endOfData, hasNext, next, peekMethods inherited from class com.google.common.collect.UnmodifiableIterator
removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.stardog.stark.query.GraphQueryResult
toGraphMethods inherited from interface java.util.Iterator
forEachRemaining, removeMethods inherited from interface com.stardog.stark.query.QueryResult
hasNext, metadata, next, stream
-
Constructor Details
-
AsyncGraphQueryResult
public AsyncGraphQueryResult(InputStream input, RDFParser parser, Options parserOptions, ExecutorService execService, int batchSize, CancelCheck cancelCheck, Consumer<Boolean> onClose, Function<Exception, RuntimeException> onError)
-
-
Method Details
-
close
public void close()Description copied from interface:QueryResultClose the query results and return any resources in use back to the system. This *must* be called on all result sets to avoid resource leaks.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseableIterator<Statement>- Specified by:
closein interfaceQueryResult<Statement>
-
computeNext
- Specified by:
computeNextin classcom.google.common.collect.AbstractIterator<Statement>
-
namespaces
Description copied from interface:GraphQueryResultThe set of namespaces, if specified, that are to be used with the result set.- Specified by:
namespacesin interfaceGraphQueryResult- Returns:
- the namespaces
-