org.eclipse.rdf4j.federated.evaluation.union

## Class WorkerUnionBase<T>

- java.lang.Object
- - org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<E,X>
  - - org.eclipse.rdf4j.common.iteration.LookAheadIteration<T,QueryEvaluationException>
    - - org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelExecutorBase<T>
      - - org.eclipse.rdf4j.federated.evaluation.union.UnionExecutorBase<T>
        - - org.eclipse.rdf4j.federated.evaluation.union.WorkerUnionBase<T>

- All Implemented Interfaces:
    AutoCloseable, Runnable, CloseableIteration<T,QueryEvaluationException>, Iteration<T,QueryEvaluationException>, ParallelExecutor<T>
  Direct Known Subclasses:
    ControlledWorkerUnion, SynchronousWorkerUnion

      public abstract class WorkerUnionBase<T>
      extends UnionExecutorBase<T>

  Base class for worker unions providing convenience functions to add tasks.
  Author:
    Andreas Schwarte
  See Also:
    `SynchronousWorkerUnion`, `ControlledWorkerUnion`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected List<ParallelTask<T>>` | `tasks`

    - ### Fields inherited from class org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelExecutorBase

      `evaluationThread, executorId, finished, log, NEXT_EXECUTOR_ID, queryInfo, rightIter, rightQueue, strategy`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WorkerUnionBase(FederationEvalStrategy strategy, QueryInfo queryInfo)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTask(ParallelTask<T> task)` Add a generic parallel task.

    - ### Methods inherited from class org.eclipse.rdf4j.federated.evaluation.union.UnionExecutorBase

      `getExecutorType, performExecution, union`

    - ### Methods inherited from class org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelExecutorBase

      `addResult, checkTimeout, done, getDisplayId, getId, getNextElement, getQueryInfo, handleClose, isFinished, run, toss, toString`

    - ### 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, wait, wait, wait`

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

      `stream`

- - ### Field Detail

    - #### tasks

          protected List<ParallelTask<T>> tasks

  - ### Constructor Detail

    - #### WorkerUnionBase

          public WorkerUnionBase(FederationEvalStrategy strategy,
                                 QueryInfo queryInfo)

  - ### Method Detail

    - #### addTask

          public void addTask(ParallelTask<T> task)

      Add a generic parallel task. Note that it is required that the task has this instance as its control.
      Parameters:
        `task` -

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