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
AGraphQueryResult
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
Constructors Constructor Description AsyncGraphQueryResult(java.io.InputStream input, RDFParser parser, Options parserOptions, java.util.concurrent.ExecutorService execService, int batchSize, CancelCheck cancelCheck, java.lang.Runnable 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 void
close()
Close the query results and return any resources in use back to the system.protected Statement
computeNext()
Namespaces
namespaces()
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.lang.Runnable onClose, java.util.function.Function<java.lang.Exception,java.lang.RuntimeException> onError)
-
-
Method Detail
-
close
public void close()
Description copied from interface:QueryResult
Close 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:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceCloseableIterator<Statement>
- Specified by:
close
in interfaceQueryResult<Statement>
-
computeNext
protected Statement computeNext()
- Specified by:
computeNext
in classcom.google.common.collect.AbstractIterator<Statement>
-
namespaces
@Nonnull public Namespaces namespaces()
Description copied from interface:GraphQueryResult
The set of namespaces, if specified, that are to be used with the result set.- Specified by:
namespaces
in interfaceGraphQueryResult
- Returns:
- the namespaces
-
-