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

## Interface Scheduler<T>

- All Known Implementing Classes:
    `ControlledWorkerScheduler`

      public interface Scheduler<T>

  Interface for any scheduler.
  Author:
    Andreas Schwarte
  See Also:
    `ControlledWorkerScheduler`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `abort()` | Abort the execution of running and queued tasks.
    `void` | `done()` | Inform the scheduler that a certain task is done.
    `void` | `handleResult​(CloseableIteration<T,​QueryEvaluationException> res)` | Callback to handle the result.
    `void` | `informFinish()` | Inform the scheduler that no more tasks will be scheduled.
    `boolean` | `isRunning()` | Determine if the scheduler has unfinished tasks.
    `void` | `schedule​(ParallelTask<T> task)` | Schedule the provided task.
    `void` | `shutdown()` |
    `void` | `toss​(Exception e)` | Toss an exception to the scheduler.

- - ### Method Detail

    - #### schedule

          void schedule​(ParallelTask<T> task)

      Schedule the provided task.
      Parameters:
        `task` -

    - #### handleResult

          void handleResult​(CloseableIteration<T,​QueryEvaluationException> res)

      Callback to handle the result.
      Parameters:
        `res` -

    - #### done

          void done()

      Inform the scheduler that a certain task is done.

    - #### toss

          void toss​(Exception e)

      Toss an exception to the scheduler.
      Parameters:
        `e` -

    - #### abort

          void abort()

      Abort the execution of running and queued tasks.

    - #### shutdown

          void shutdown()

    - #### informFinish

          void informFinish()

      Inform the scheduler that no more tasks will be scheduled.

    - #### isRunning

          boolean isRunning()

      Determine if the scheduler has unfinished tasks.
      Returns:
        whether the scheduler is running