Package com.stardog.stark.query.io
Class AsyncSelectQueryResult
java.lang.Object
com.google.common.collect.UnmodifiableIterator<BindingSet>
com.google.common.collect.AbstractIterator<BindingSet>
com.complexible.common.base.CloseableIterator.AbstractCloseableIterator<BindingSet>
com.stardog.stark.query.io.AsyncSelectQueryResult
- All Implemented Interfaces:
CloseableIterator<BindingSet>,QueryResult<BindingSet>,SelectQueryResult,AutoCloseable,Iterator<BindingSet>
public class AsyncSelectQueryResult
extends CloseableIterator.AbstractCloseableIterator<BindingSet>
implements SelectQueryResult
A
SelectQueryResult which asynchronously parses the result set from an input stream.- Since:
- 7.4.6
- 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
ConstructorsConstructorDescriptionAsyncSelectQueryResult(InputStream input, QueryResultParser<SelectQueryResultHandler> parser, ExecutorService execService, int batchSize, CancelCheck cancelCheck, Consumer<Boolean> onClose, Function<Exception, RuntimeException> onError) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the query results and return any resources in use back to the system.protected BindingSetReturn the list of projected variables from the queryMethods 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 java.util.Iterator
forEachRemaining, removeMethods inherited from interface com.stardog.stark.query.QueryResult
hasNext, metadata, next, stream
-
Constructor Details
-
AsyncSelectQueryResult
public AsyncSelectQueryResult(InputStream input, QueryResultParser<SelectQueryResultHandler> parser, 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<BindingSet>- Specified by:
closein interfaceQueryResult<BindingSet>
-
computeNext
- Specified by:
computeNextin classcom.google.common.collect.AbstractIterator<BindingSet>
-
variables
Description copied from interface:SelectQueryResultReturn the list of projected variables from the query- Specified by:
variablesin interfaceSelectQueryResult- Returns:
- the projection
-