public abstract class IterativeWorkerTaskFactory<T> extends java.lang.Object implements ExecutorServices.TaskFactory<java.lang.Void>
| Constructor and Description |
|---|
IterativeWorkerTaskFactory(java.lang.Iterable<? extends T> iterable) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanup()
Called after the computation finishes.
|
java.util.List<java.util.concurrent.Callable<java.lang.Void>> |
createTasks(int threadPoolSize)
Creates a list of tasks to be executed in a thread pool.
|
protected abstract void |
doWork(T item) |
java.util.Queue<T> |
getQueue() |
protected void |
init()
Called before the compilation begins.
|
public IterativeWorkerTaskFactory(java.lang.Iterable<? extends T> iterable)
public java.util.List<java.util.concurrent.Callable<java.lang.Void>> createTasks(int threadPoolSize)
ExecutorServices.TaskFactorycreateTasks in interface ExecutorServices.TaskFactory<java.lang.Void>threadPoolSize - the size of the underlying thread poolprotected void init()
protected void cleanup()
protected abstract void doWork(T item)
public java.util.Queue<T> getQueue()
Copyright © 2015. All Rights Reserved.