Class IteratorAsQueryResult<T>

java.lang.Object
com.google.common.collect.UnmodifiableIterator<T>
com.google.common.collect.AbstractIterator<T>
com.complexible.common.rdf.query.IteratorAsQueryResult<T>
All Implemented Interfaces:
CloseableIterator<T>, AutoCloseable, Iterator<T>
Direct Known Subclasses:
IteratorAsBooleanQueryResult, IteratorAsGraphQueryResult, IteratorAsPathQueryResult, IteratorAsTupleQueryResult

public abstract class IteratorAsQueryResult<T> extends com.google.common.collect.AbstractIterator<T> implements CloseableIterator<T>
Base super-class for all iterator-as-query-result classes. It handles the on-success, on-failure, and on-close callbacks.

The result also optionally carries the optimized Plan that produced it (see getPlan()). The query engine always embeds the plan here — it is already computed, so this is free — which lets the server return it on request (see QueryDetail.PLAN) without a separate execution. The plan is null for results not built by the engine's normal execution path.

Author:
Pavel Klinov