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>
,java.lang.AutoCloseable
,java.util.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
Constructors Constructor Description IteratorAsQueryResult(CloseableIterator<T> theIter, java.lang.Runnable theOnClose, java.lang.Runnable theOnSuccess)
IteratorAsQueryResult(CloseableIterator<T> theIter, java.lang.Runnable theOnClose, java.lang.Runnable theOnSuccess, java.util.function.Function<java.lang.Exception,java.lang.RuntimeException> theOnError)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected T
computeNext()
-
Methods inherited from class com.google.common.collect.AbstractIterator
endOfData, hasNext, next, peek
-
-
-
-
Constructor Detail
-
IteratorAsQueryResult
public IteratorAsQueryResult(CloseableIterator<T> theIter, java.lang.Runnable theOnClose, java.lang.Runnable theOnSuccess)
-
IteratorAsQueryResult
public IteratorAsQueryResult(CloseableIterator<T> theIter, java.lang.Runnable theOnClose, java.lang.Runnable theOnSuccess, java.util.function.Function<java.lang.Exception,java.lang.RuntimeException> theOnError)
-
-
Method Detail
-
close
public void close() throws QueryExecutionFailure
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceCloseableIterator<T>
- Throws:
QueryExecutionFailure
-
-