Class TaskPerItemTaskFactory<T>

  • Type Parameters:
    T - the type of the processed items
    All Implemented Interfaces:
    org.jboss.weld.manager.api.ExecutorServices.TaskFactory<Void>

    public abstract class TaskPerItemTaskFactory<T>
    extends Object
    implements org.jboss.weld.manager.api.ExecutorServices.TaskFactory<Void>
    The factory creates a new Callable for each item of the source iterable. The list of callables is then returned from the createTasks(int) method. The size of the thread pool is not considered.
    Author:
    Jozef Hartinger
    • Constructor Detail

      • TaskPerItemTaskFactory

        public TaskPerItemTaskFactory​(Iterable<? extends T> iterable)
    • Method Detail

      • createTasks

        public List<Callable<Void>> createTasks​(int threadPoolSize)
        Specified by:
        createTasks in interface org.jboss.weld.manager.api.ExecutorServices.TaskFactory<T>
      • doWork

        protected abstract void doWork​(T item)