Class TaskSchedulingAction

java.lang.Object
eu.cloudnetservice.driver.impl.network.scheduler.TaskSchedulingAction
All Implemented Interfaces:
Runnable

final class TaskSchedulingAction extends Object implements Runnable
The task scheduler runnable that is responsible for scheduling incoming tasks into the target executor service. Due to the fact that the scheduling action could be blocking, this action should be scheduled in a separate thread.
Since:
4.0
  • Field Details

  • Constructor Details

  • Method Details

    • run

      public void run()
      Schedules tasks that were added to the unscheduled tasks queue into the target executor. This operation blocks until a task is available in the tasks queue.
      Specified by:
      run in interface Runnable
    • scheduleTask

      public void scheduleTask(@NonNull @NonNull Runnable task)
      Schedules the given task for execution.
      Parameters:
      task - the task to execute.
      Throws:
      NullPointerException - if the given task is null.