jakartaee / batch

The Jakarta Batch project produces the Batch Specification and API.
https://projects.eclipse.org/projects/ee4j.batch
Apache License 2.0
13 stars 17 forks source link

parallel processing for processors #81

Open follis opened 4 years ago

follis commented 4 years ago

Originally opened as bug 7290 by rmannibucau

--------------Original Comment History---------------------------- Comment from = rmannibucau on 2015-09-05 09:30:49 +0000

If processing of an ItemProcessor is a bit long parallelizing it can be good. It means the processor can return a Future or CompletionStage and parallelization can be activated by @Parallelizable on the processor or a default method in ItemProcessor returning a boolean to say if it is or not parallelizable. Then we would need a BatchItemWriter { void write(List<Future> futures) } as writer to be able to work with it.

If the writer is not a BatchItemWriter then the framework would just wait for the end of all items of the chunk before calling the writer unwrapping futures.