Package com.complexible.common.rdf.query
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.
- 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
ConstructorsConstructorDescriptionIteratorAsQueryResult(CloseableIterator<T> theIter, Runnable theOnClose, Runnable theOnSuccess) IteratorAsQueryResult(CloseableIterator<T> theIter, Runnable theOnClose, Runnable theOnSuccess, Function<Exception, RuntimeException> theOnError) -
Method Summary
Methods 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, hasNext, next, remove
-
Constructor Details
-
IteratorAsQueryResult
public IteratorAsQueryResult(CloseableIterator<T> theIter, Runnable theOnClose, Runnable theOnSuccess) -
IteratorAsQueryResult
public IteratorAsQueryResult(CloseableIterator<T> theIter, Runnable theOnClose, Runnable theOnSuccess, Function<Exception, RuntimeException> theOnError)
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseableIterator<T>- Throws:
QueryExecutionFailure
-
computeNext
- Specified by:
computeNextin classcom.google.common.collect.AbstractIterator<T>
-