org.eclipse.rdf4j.federated.evaluation.concurrent

## Interface ParallelExecutor<T>

- All Superinterfaces:
    Runnable
  All Known Implementing Classes:
    ControlledWorkerBoundJoin, ControlledWorkerJoin, ControlledWorkerLeftJoin, ControlledWorkerUnion, HashJoin, JoinExecutorBase, ParallelExecutorBase, ParallelServiceExecutor, SourceSelection.SourceSelectionExecutorWithLatch, SynchronousBoundJoin, SynchronousJoin, SynchronousWorkerUnion, UnionExecutorBase, WorkerUnionBase

      public interface ParallelExecutor<T>
      extends Runnable

  Interface for any parallel cursor, i.e. result iterations. Implementations can act as control for scheduler implementations, e.g. `ControlledWorkerScheduler`. The common use case is to pass results from the scheduler to the controlling result iteration.
  Author:
    Andreas Schwarte
  See Also:
    `JoinExecutorBase`, `UnionExecutorBase`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addResult(CloseableIteration<T,QueryEvaluationException> res)` Handle the result appropriately, e.g.
    `void` | `done()` Inform the controlling instance that some job is done from a different thread.
    `QueryInfo` | `getQueryInfo()` Return the query info of the associated query
    `boolean` | `isFinished()` Return true if this executor is finished or aborted
    `void` | `toss(Exception e)` Toss some exception to the controlling instance

    - ### Methods inherited from interface java.lang.Runnable

      `run`

- - ### Method Detail

    - #### addResult

          void addResult(CloseableIteration<T,QueryEvaluationException> res)

      Handle the result appropriately, e.g. add it to the result iteration. Take care for synchronization in a multithreaded environment
      Parameters:
        `res` -

    - #### toss

          void toss(Exception e)

      Toss some exception to the controlling instance
      Parameters:
        `e` -

    - #### done

          void done()

      Inform the controlling instance that some job is done from a different thread. In most cases this is a no-op.

    - #### isFinished

          boolean isFinished()

      Return true if this executor is finished or aborted
      Returns:
        whether the execution is finished

    - #### getQueryInfo

          QueryInfo getQueryInfo()

      Return the query info of the associated query
      Returns:
        the query info

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.