public class TaskManager extends Object
| Modifier and Type | Method and Description | 
|---|---|
| static TaskManager | getManager()Get the singleton controlling the tasks. | 
| int | getMaximumWorkerCount()Get the maximum worker count for the pool. | 
| int | getMinimumWorkerCount()Get the minimum worker count for the pool. | 
| int | getWorkerCount()Get the current worker count for the pool. | 
| boolean | queueTask(Task task)Queue the task for execution. | 
| void | setMaximumWorkerCount(int maximumWorkerCount)Set the maximum worker count for the pool. | 
| void | setMinimumWorkerCount(int minimumWorkerCount)Set the minimum worker count for the pool. | 
| void | shutdown()Close all threads and reset the task list. | 
public static TaskManager getManager()
public boolean queueTask(Task task)
task - The task to be executed.public void setMinimumWorkerCount(int minimumWorkerCount)
minimumWorkerCount - The minimum worker count.public int getMinimumWorkerCount()
public void setMaximumWorkerCount(int maximumWorkerCount)
maximumWorkerCount - The maximum worker count.public int getMaximumWorkerCount()
public int getWorkerCount()
public void shutdown()
Copyright © 2019 JBoss by Red Hat. All rights reserved.