diff --git a/pom.xml b/pom.xml
index 8933ea3..9fbbe74 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
common-utils
org.warp
- 1.1.5
+ 1.1.6
UTF-8
diff --git a/src/main/java/org/warp/commonutils/batch/ParallelUtils.java b/src/main/java/org/warp/commonutils/batch/ParallelUtils.java
deleted file mode 100644
index 093b7ff..0000000
--- a/src/main/java/org/warp/commonutils/batch/ParallelUtils.java
+++ /dev/null
@@ -1,763 +0,0 @@
-package org.warp.commonutils.batch;
-
-import java.io.IOException;
-import java.util.concurrent.CompletionException;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.function.BiConsumer;
-import java.util.function.Consumer;
-import java.util.function.Supplier;
-import org.warp.commonutils.concurrency.executor.BlockingOnFullQueueExecutorServiceDecorator;
-import org.warp.commonutils.concurrency.executor.BoundedExecutorService;
-import org.warp.commonutils.functional.CancellableBiConsumer;
-import org.warp.commonutils.functional.CancellableConsumer;
-import org.warp.commonutils.functional.CancellableTriConsumer;
-import org.warp.commonutils.functional.ConsumerResult;
-import org.warp.commonutils.functional.IOBiConsumer;
-import org.warp.commonutils.functional.IOConsumer;
-import org.warp.commonutils.functional.IOTriConsumer;
-import org.warp.commonutils.functional.TriConsumer;
-import org.warp.commonutils.type.IntWrapper;
-import org.warp.commonutils.type.ShortNamedThreadFactory;
-import org.warp.commonutils.type.VariableWrapper;
-
-public class ParallelUtils {
-
- public static void parallelizeIO(IOConsumer> iterator,
- int maxQueueSize,
- int parallelism,
- int groupSize,
- IOConsumer consumer) throws IOException {
- Consumer> action = (cons) -> {
- try {
- iterator.consume(cons::accept);
- } catch (IOException e) {
- throw new CompletionException(e);
- }
- };
-
- try {
- parallelize(action, maxQueueSize, parallelism, groupSize, (v) -> {
- try {
- consumer.consume(v);
- } catch (IOException ex) {
- throw new CompletionException(ex);
- }
- });
- } catch (CompletionException ex) {
- if (ex.getCause() instanceof CompletionException && ex.getCause().getCause() instanceof IOException) {
- throw (IOException) ex.getCause().getCause();
- } else if (ex.getCause() instanceof IOException) {
- throw (IOException) ex.getCause();
- } else {
- throw new IOException(ex);
- }
- }
- }
-
- public static void parallelize(Consumer> iterator,
- int maxQueueSize,
- int parallelism,
- int groupSize, Consumer consumer) throws CompletionException {
- var parallelExecutor = BoundedExecutorService.create(maxQueueSize,
- parallelism,
- 0,
- TimeUnit.MILLISECONDS,
- new ShortNamedThreadFactory("ForEachParallel"),
- (a, b) -> {}
- );
- final int CHUNK_SIZE = groupSize;
- IntWrapper count = new IntWrapper(CHUNK_SIZE);
- VariableWrapper