diff --git a/bom-decomposer/src/main/java/io/quarkus/bom/decomposer/BomDecomposer.java b/bom-decomposer/src/main/java/io/quarkus/bom/decomposer/BomDecomposer.java index 479e2043..4cb2e58a 100644 --- a/bom-decomposer/src/main/java/io/quarkus/bom/decomposer/BomDecomposer.java +++ b/bom-decomposer/src/main/java/io/quarkus/bom/decomposer/BomDecomposer.java @@ -29,10 +29,6 @@ public class BomDecomposer { - public static boolean isParallelProcessing() { - return Boolean.getBoolean("parallelProcessing"); - } - public static BomDecomposerConfig config() { return new BomDecomposer().new BomDecomposerConfig(); } diff --git a/bom-decomposer/src/main/java/io/quarkus/bom/task/ConcurrentTaskScheduler.java b/bom-decomposer/src/main/java/io/quarkus/bom/task/ParallelTaskScheduler.java similarity index 94% rename from bom-decomposer/src/main/java/io/quarkus/bom/task/ConcurrentTaskScheduler.java rename to bom-decomposer/src/main/java/io/quarkus/bom/task/ParallelTaskScheduler.java index a94c234a..44c5bbb5 100644 --- a/bom-decomposer/src/main/java/io/quarkus/bom/task/ConcurrentTaskScheduler.java +++ b/bom-decomposer/src/main/java/io/quarkus/bom/task/ParallelTaskScheduler.java @@ -6,7 +6,7 @@ import java.util.concurrent.ConcurrentLinkedDeque; import java.util.concurrent.Phaser; -public class ConcurrentTaskScheduler implements PlatformGenTaskScheduler { +public class ParallelTaskScheduler implements PlatformGenTaskScheduler { private final Phaser phaser = new Phaser(1); private final Deque errors = new ConcurrentLinkedDeque<>(); diff --git a/bom-decomposer/src/main/java/io/quarkus/bom/task/PlatformGenTaskScheduler.java b/bom-decomposer/src/main/java/io/quarkus/bom/task/PlatformGenTaskScheduler.java index 1b7648d8..e0101bab 100644 --- a/bom-decomposer/src/main/java/io/quarkus/bom/task/PlatformGenTaskScheduler.java +++ b/bom-decomposer/src/main/java/io/quarkus/bom/task/PlatformGenTaskScheduler.java @@ -1,12 +1,13 @@ package io.quarkus.bom.task; -import io.quarkus.bom.decomposer.BomDecomposer; import java.util.Collection; public interface PlatformGenTaskScheduler { + boolean IS_PARALLEL_DEFAULT = !Boolean.getBoolean("sequentialTaskScheduler"); + static PlatformGenTaskScheduler getInstance() { - return BomDecomposer.isParallelProcessing() ? new ConcurrentTaskScheduler() : new SequentialTaskScheduler(); + return IS_PARALLEL_DEFAULT ? new ParallelTaskScheduler() : new SequentialTaskScheduler(); } void schedule(PlatformGenTask task) throws Exception;