Add getTask in SchedulerManager

This commit is contained in:
KrystilizeNevaDies 2021-03-22 21:23:57 +10:00
parent b6d8dd9f73
commit 77af63772f

View File

@ -151,6 +151,16 @@ public final class SchedulerManager implements IExtensionObserver {
public ObjectCollection<Task> getTasks() {
return tasks.values();
}
/**
* Returns the task associated with this task id
*
* @param id the id of the task
* @return task the task itself
*/
public Task getTask(int id) {
return tasks.get(id);
}
/**
* Gets a {@link Collection} with all the registered shutdown {@link Task}.
@ -161,6 +171,16 @@ public final class SchedulerManager implements IExtensionObserver {
public ObjectCollection<Task> getShutdownTasks() {
return shutdownTasks.values();
}
/**
* Returns the shutdown task associated with this task id
*
* @param id the id of the task
* @return task the shutdown task itself
*/
public Task getShutdownTask(int id) {
return shutdownTasks.get(id);
}
/**
* Gets the execution service for all the registered {@link Task}.