Package com.stardog.stark.query.io
Class AsyncGraphQueryResult
- java.lang.Object
-
- com.google.common.collect.UnmodifiableIterator<T>
-
- com.google.common.collect.AbstractIterator<T>
-
- com.complexible.common.base.CloseableIterator.AbstractCloseableIterator<Statement>
-
- com.stardog.stark.query.io.AsyncGraphQueryResult
-
- All Implemented Interfaces:
CloseableIterator<Statement>,GraphQueryResult,QueryResult<Statement>,java.lang.AutoCloseable,java.util.Iterator<Statement>
public class AsyncGraphQueryResult extends CloseableIterator.AbstractCloseableIterator<Statement> implements GraphQueryResult
AGraphQueryResultwhich 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
Constructors Constructor Description AsyncGraphQueryResult(java.io.InputStream input, RDFParser parser, Options parserOptions, java.util.concurrent.ExecutorService execService, int batchSize, CancelCheck cancelCheck, java.util.function.Consumer<java.lang.Boolean> onClose, java.util.function.Function<java.lang.Exception,java.lang.RuntimeException> onError)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the query results and return any resources in use back to the system.protected StatementcomputeNext()Namespacesnamespaces()The set of namespaces, if specified, that are to be used with the result set.-
Methods inherited from class com.google.common.collect.AbstractIterator
endOfData, hasNext, next, peek
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.stardog.stark.query.GraphQueryResult
toGraph
-
Methods inherited from interface com.stardog.stark.query.QueryResult
hasNext, metadata, next, stream
-
-
-
-
Constructor Detail
-
AsyncGraphQueryResult
public AsyncGraphQueryResult(java.io.InputStream input, RDFParser parser, Options parserOptions, java.util.concurrent.ExecutorService execService, int batchSize, CancelCheck cancelCheck, java.util.function.Consumer<java.lang.Boolean> onClose, java.util.function.Function<java.lang.Exception,java.lang.RuntimeException> onError)
-
-
Method Detail
-
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 interfacejava.lang.AutoCloseable- Specified by:
closein interfaceCloseableIterator<Statement>- Specified by:
closein interfaceQueryResult<Statement>
-
computeNext
protected Statement computeNext()
- Specified by:
computeNextin classcom.google.common.collect.AbstractIterator<Statement>
-
namespaces
@Nonnull public Namespaces 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
-
-