Class DefaultParallelExecutionConfiguration
- java.lang.Object
-
- org.junit.platform.engine.support.hierarchical.DefaultParallelExecutionConfiguration
-
- All Implemented Interfaces:
ParallelExecutionConfiguration
class DefaultParallelExecutionConfiguration extends java.lang.Object implements ParallelExecutionConfiguration
- Since:
- 1.3
-
-
Field Summary
Fields Modifier and Type Field Description private intcorePoolSizeprivate intkeepAliveSecondsprivate intmaxPoolSizeprivate intminimumRunnableprivate intparallelismprivate java.util.function.Predicate<? super java.util.concurrent.ForkJoinPool>saturate
-
Constructor Summary
Constructors Constructor Description DefaultParallelExecutionConfiguration(int parallelism, int minimumRunnable, int maxPoolSize, int corePoolSize, int keepAliveSeconds, java.util.function.Predicate<? super java.util.concurrent.ForkJoinPool> saturate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCorePoolSize()Get the core thread pool size to be used.intgetKeepAliveSeconds()Get the number of seconds for which inactive threads should be kept alive before terminating them and shrinking the thread pool.intgetMaxPoolSize()Get the maximum thread pool size to be used.intgetMinimumRunnable()Get the minimum number of runnable threads to be used.intgetParallelism()Get the parallelism to be used.java.util.function.Predicate<? super java.util.concurrent.ForkJoinPool>getSaturatePredicate()Get the saturate predicate to be used for the execution'sForkJoinPool.
-
-
-
Field Detail
-
parallelism
private final int parallelism
-
minimumRunnable
private final int minimumRunnable
-
maxPoolSize
private final int maxPoolSize
-
corePoolSize
private final int corePoolSize
-
keepAliveSeconds
private final int keepAliveSeconds
-
saturate
private final java.util.function.Predicate<? super java.util.concurrent.ForkJoinPool> saturate
-
-
Method Detail
-
getParallelism
public int getParallelism()
Description copied from interface:ParallelExecutionConfigurationGet the parallelism to be used.- Specified by:
getParallelismin interfaceParallelExecutionConfiguration- See Also:
ForkJoinPool.getParallelism()
-
getMinimumRunnable
public int getMinimumRunnable()
Description copied from interface:ParallelExecutionConfigurationGet the minimum number of runnable threads to be used.- Specified by:
getMinimumRunnablein interfaceParallelExecutionConfiguration
-
getMaxPoolSize
public int getMaxPoolSize()
Description copied from interface:ParallelExecutionConfigurationGet the maximum thread pool size to be used.- Specified by:
getMaxPoolSizein interfaceParallelExecutionConfiguration
-
getCorePoolSize
public int getCorePoolSize()
Description copied from interface:ParallelExecutionConfigurationGet the core thread pool size to be used.- Specified by:
getCorePoolSizein interfaceParallelExecutionConfiguration
-
getKeepAliveSeconds
public int getKeepAliveSeconds()
Description copied from interface:ParallelExecutionConfigurationGet the number of seconds for which inactive threads should be kept alive before terminating them and shrinking the thread pool.- Specified by:
getKeepAliveSecondsin interfaceParallelExecutionConfiguration
-
getSaturatePredicate
public java.util.function.Predicate<? super java.util.concurrent.ForkJoinPool> getSaturatePredicate()
Description copied from interface:ParallelExecutionConfigurationGet the saturate predicate to be used for the execution'sForkJoinPool.- Specified by:
getSaturatePredicatein interfaceParallelExecutionConfiguration- Returns:
- the saturate predicate to be passed to the
ForkJoinPoolconstructor; may benull - See Also:
ForkJoinPool(int, ForkJoinPool.ForkJoinWorkerThreadFactory, Thread.UncaughtExceptionHandler, boolean, int, int, int, Predicate, long, TimeUnit)
-
-