Package org.jboss.weld.executor
Class IterativeWorkerTaskFactory<T>
java.lang.Object
org.jboss.weld.executor.IterativeWorkerTaskFactory<T>
- Record Components:
T- the type of processed items
- All Implemented Interfaces:
org.jboss.weld.manager.api.ExecutorServices.TaskFactory<Void>
public abstract class IterativeWorkerTaskFactory<T>
extends Object
implements org.jboss.weld.manager.api.ExecutorServices.TaskFactory<Void>
Used for decomposition of loops in which independent tasks are processed sequentially.
Based on the size of a thread pool, the factory creates an equal number of workers. Each worker iterates on a shared
concurrent queue. The queue is created from the source items (iterable).
- Author:
- Jozef Hartinger
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
IterativeWorkerTaskFactory
-
-
Method Details
-
createTasks
- Specified by:
createTasksin interfaceorg.jboss.weld.manager.api.ExecutorServices.TaskFactory<T>
-
init
protected void init()Called before the compilation begins. -
cleanup
protected void cleanup()Called after the computation finishes. -
doWork
-
getQueue
-