Package org.eclipse.rdf4j.federated.evaluation.concurrent

## Class FedXQueueCursor<T>

- java.lang.Object
- - org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<E,​X>
  - - org.eclipse.rdf4j.common.iteration.LookAheadIteration<E,​T>
    - - org.eclipse.rdf4j.common.iteration.QueueIteration<E,​QueryEvaluationException>
      - - org.eclipse.rdf4j.query.impl.QueueCursor<CloseableIteration<T,​QueryEvaluationException>>
        - - org.eclipse.rdf4j.federated.evaluation.concurrent.FedXQueueCursor<T>

- Type Parameters:
    `T` -
  All Implemented Interfaces:
    `AutoCloseable`, `CloseableIteration<CloseableIteration<T,​QueryEvaluationException>,​QueryEvaluationException>`, `Iteration<CloseableIteration<T,​QueryEvaluationException>,​QueryEvaluationException>`

      public class FedXQueueCursor<T>
      extends QueueCursor<CloseableIteration<T,​QueryEvaluationException>>

  Specialized variants of `QueueCursor` which avoids converting any exception if it is already of type`QueryEvaluationException`.
  Author:
    Andreas Schwarte

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected QueryEvaluationException` | `convert​(Exception e)` | Converts an exception from the underlying iteration to an exception of type X.
    `static <T> FedXQueueCursor<T>` | `create​(int capacity, WeakReference<?> callerReference)` |
    `void` | `handleClose()` | Called by `AbstractCloseableIteration.close()` when it is called for the first time.

    - ### Methods inherited from class org.eclipse.rdf4j.common.iteration.QueueIteration

      `checkException, done, getNextElement, put, toss`

    - ### Methods inherited from class org.eclipse.rdf4j.common.iteration.LookAheadIteration

      `hasNext, next, remove`

    - ### Methods inherited from class org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration

      `close, isClosed`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.eclipse.rdf4j.common.iteration.Iteration

      `stream`

- - ### Method Detail

    - #### create

          public static <T> FedXQueueCursor<T> create​(int capacity,
                                                      WeakReference<?> callerReference)

    - #### convert

          protected QueryEvaluationException convert​(Exception e)

      Description copied from class: `QueueIteration`
      Converts an exception from the underlying iteration to an exception of type X.
      Overrides:
        `convert` in class `QueueCursor<CloseableIteration<T,​QueryEvaluationException>>`

    - #### handleClose

          public void handleClose()
                           throws QueryEvaluationException

      Description copied from class: `AbstractCloseableIteration`
      Called by `AbstractCloseableIteration.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:
        `handleClose` in class `QueueIteration<CloseableIteration<T,​QueryEvaluationException>,​QueryEvaluationException>`
      Throws:
        `QueryEvaluationException`