public class TaskManager extends Object
Task
and the backing ExecutorService
. It is intended to
be a singleton for an instance of the Alpaca CLI.Constructor and Description |
---|
TaskManager()
Creates a new TaskManager with a cached thread pool.
|
Modifier and Type | Method and Description |
---|---|
Future |
addTask(Task task)
Adds the provided task to the TaskManager and stars the task.
|
void |
close()
Closes the thread pool and the underlying task.
|
String |
getTaskId(String taskName)
Generates a Unique Id
|
ConcurrentHashMap.KeySetView<Task,Boolean> |
getTaskList()
Returns the set of tasks that have been added to the TaskManager.
|
void |
removeTask(Task task)
Closes the provided task and removes it from the tracking list.
|
public TaskManager()
public ConcurrentHashMap.KeySetView<Task,Boolean> getTaskList()
public Future addTask(Task task)
task
- The task to add.public void removeTask(Task task)
task
- The task to close.public void close()
Copyright © 2017 ECG. All rights reserved.