Class FedXQueueCursor<T>
java.lang.Object
org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<CloseableIteration<T>>
org.eclipse.rdf4j.common.iteration.LookAheadIteration<CloseableIteration<T>>
org.eclipse.rdf4j.common.iteration.QueueIteration<CloseableIteration<T>, QueryEvaluationException>
org.eclipse.rdf4j.query.impl.QueueCursor<CloseableIteration<T>>
org.eclipse.rdf4j.federated.evaluation.concurrent.FedXQueueCursor<T>
- Type Parameters:
T-
- All Implemented Interfaces:
AutoCloseable, Iterator<CloseableIteration<T>>, CloseableIteration<CloseableIteration<T>>
Specialized variants of
QueueCursor which avoids converting any exception if it is already of
typeQueryEvaluationException.- Author:
- Andreas Schwarte
-
Field Summary
Fields inherited from interface CloseableIteration
EMPTY_STATEMENT_ITERATION -
Method Summary
Modifier and TypeMethodDescriptionprotected QueryEvaluationExceptionConverts an exception from the underlying iteration to an exception of type X.static <T> FedXQueueCursor<T> create(int capacity) static <T> FedXQueueCursor<T> create(int capacity, WeakReference<?> callerReference) voidCalled byAbstractCloseableIteration.close()when it is called for the first time.Methods inherited from class QueueIteration
checkException, done, getNextElement, put, tossModifier and TypeMethodDescriptionvoidvoiddone()Indicates the methodQueueIteration.put(Object)will not be called in the queue anymore.Returns the next item in the queue, which may be null, or throws an exception.voidput(CloseableIteration<T> item) Adds another item to the queue, blocking while the queue is full.voidThe next timeLookAheadIteration.next()is called this exception will be thrown.Methods inherited from class LookAheadIteration
hasNext, next, removeModifier and TypeMethodDescriptionfinal booleanhasNext()final CloseableIteration<T> next()voidremove()Throws anUnsupportedOperationException.Methods inherited from class AbstractCloseableIteration
close, isClosedModifier and TypeMethodDescriptionfinal voidclose()CallsAbstractCloseableIteration.handleClose()upon first call and makes sure the resource closures are only executed once.final booleanisClosed()Checks whether this CloseableIteration has been closed.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CloseableIteration
streamModifier and TypeMethodDescriptiondefault Stream<CloseableIteration<T>> stream()Convert the results to a Java 8 Stream.Methods inherited from interface Iterator
forEachRemaining
-
Method Details
-
create
-
create
-
convert
Description copied from class:QueueIterationConverts an exception from the underlying iteration to an exception of type X.- Overrides:
convertin classQueueCursor<CloseableIteration<T>>
-
handleClose
Description copied from class:AbstractCloseableIterationCalled byAbstractCloseableIteration.close()when it is called for the first time. This method is only called once on each iteration. By default, this method does nothing.- Overrides:
handleClosein classQueueIteration<CloseableIteration<T>, QueryEvaluationException>- Throws:
QueryEvaluationException
-