org.eclipse.rdf4j.federated.optimizer

## Class SourceSelection.ParallelCheckTask

- java.lang.Object
- - org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelTaskBase<BindingSet>
  - - org.eclipse.rdf4j.federated.optimizer.SourceSelection.ParallelCheckTask

- All Implemented Interfaces:
    ParallelTask<BindingSet>
  Enclosing class:
    SourceSelection

      protected static class SourceSelection.ParallelCheckTask
      extends ParallelTaskBase<BindingSet>

  Task for sending an ASK request to the endpoints (for source selection)
  Author:
    Andreas Schwarte

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected SourceSelection.SourceSelectionExecutorWithLatch` | `control`
    `protected Endpoint` | `endpoint`
    `protected QueryInfo` | `queryInfo`
    `protected StatementPattern` | `stmt`

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

      `scheduledFuture`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParallelCheckTask(Endpoint endpoint, StatementPattern stmt, QueryInfo queryInfo, SourceSelection.SourceSelectionExecutorWithLatch control)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cancel()` Optional implementation to cancel this task on a best effort basis
    `ParallelExecutor<BindingSet>` | `getControl()` return the controlling instance, e.g.
    `protected CloseableIteration<BindingSet,QueryEvaluationException>` | `performTaskInternal()`

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

      `performTask, setScheduledFuture, toString`

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

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

    - ### Methods inherited from interface org.eclipse.rdf4j.federated.evaluation.concurrent.ParallelTask

      `getQueryInfo`

- - ### Field Detail

    - #### endpoint

          protected final Endpoint endpoint

    - #### stmt

          protected final StatementPattern stmt

    - #### control

          protected final SourceSelection.SourceSelectionExecutorWithLatch control

    - #### queryInfo

          protected final QueryInfo queryInfo

  - ### Constructor Detail

    - #### ParallelCheckTask

          public ParallelCheckTask(Endpoint endpoint,
                                   StatementPattern stmt,
                                   QueryInfo queryInfo,
                                   SourceSelection.SourceSelectionExecutorWithLatch control)

  - ### Method Detail

    - #### performTaskInternal

          protected CloseableIteration<BindingSet,QueryEvaluationException> performTaskInternal()
                                                                                         throws Exception

      Specified by:
        `performTaskInternal` in class `ParallelTaskBase<BindingSet>`
      Throws:
        `Exception`

    - #### getControl

          public ParallelExecutor<BindingSet> getControl()

      Description copied from interface: `ParallelTask`
      return the controlling instance, e.g. in most cases the instance of a thread. Shared variables are used to inform the thread about new events.
      Returns:
        the control executor

    - #### cancel

          public void cancel()

      Description copied from interface: `ParallelTask`
      Optional implementation to cancel this task on a best effort basis
      Specified by:
        `cancel` in interface `ParallelTask<BindingSet>`
      Overrides:
        `cancel` in class `ParallelTaskBase<BindingSet>`

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