public class TaskProcessor extends Object
| Constructor and Description |
|---|
TaskProcessor(ExecutorService executor,
Reporter reporter)
TaskProcess constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<T> List<TaskStatusHandler> |
processTasks(List<InstanceTask<T>> tasks,
int timeout,
TimeUnit timeUnit,
TaskMethod<T> processor)
Processes the list of InstanceTasks within a set timeout deadline.
|
boolean |
ready()
Returns whether or not the executor service has threads available
for work on tasks.
|
void |
setThreadPoolExecutor(ExecutorService executor) |
void |
stop()
Stops the excutor service.
|
public TaskProcessor(ExecutorService executor, Reporter reporter)
public void setThreadPoolExecutor(ExecutorService executor)
public boolean ready()
public <T> List<TaskStatusHandler> processTasks(List<InstanceTask<T>> tasks, int timeout, TimeUnit timeUnit, TaskMethod<T> processor) throws Exception
Exceptionpublic void stop()
Copyright © 2020. All rights reserved.