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

  Constructors
  Constructor
  Description
  `AsyncGraphQueryResult(InputStream input, RDFParser parser, Options parserOptions, ExecutorService execService, int batchSize, CancelCheck cancelCheck, Consumer<Boolean> onClose, Function<Exception,RuntimeException> onError)`

- ## Method Summary

  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 com.google.common.collect.UnmodifiableIterator

  `remove`

  ### 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 java.util.Iterator

  `forEachRemaining, remove`

  ### Methods 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: `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 interface `AutoCloseable`
    Specified by:
      `close` in interface `CloseableIterator<Statement>`
    Specified by:
      `close` in interface `QueryResult<Statement>`

  - ### computeNext

    protected Statement computeNext()
    Specified by:
      `computeNext` in class `com.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 interface `GraphQueryResult`
    Returns:
      the namespaces