Remove task from the mapping of all tasks and from the execution queue. @param task the task to be removed
(Task task)
| 125 | * @param task the task to be removed |
| 126 | */ |
| 127 | public static void removeTask(Task task) { |
| 128 | if (taskMap.containsKey(task)) { |
| 129 | ScheduledTask scheduledTask = taskMap.get(task); |
| 130 | taskQueue.remove(scheduledTask); |
| 131 | taskMap.remove(task, scheduledTask); |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * Get the {@link Task} from the execution queue to be executed next. |