Class DefaultParallelExecutionConfiguration
java.lang.Object
org.junit.platform.engine.support.hierarchical.DefaultParallelExecutionConfiguration
- All Implemented Interfaces:
ParallelExecutionConfiguration
class DefaultParallelExecutionConfiguration
extends Object
implements ParallelExecutionConfiguration
- Since:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final int
private final int
private final int
private final int
private final Predicate
<? super ForkJoinPool> -
Constructor Summary
ConstructorsConstructorDescriptionDefaultParallelExecutionConfiguration
(int parallelism, int minimumRunnable, int maxPoolSize, int corePoolSize, int keepAliveSeconds, Predicate<? super ForkJoinPool> saturate) -
Method Summary
Modifier and TypeMethodDescriptionint
Get the core thread pool size to be used.int
Get the number of seconds for which inactive threads should be kept alive before terminating them and shrinking the thread pool.int
Get the maximum thread pool size to be used.int
Get the minimum number of runnable threads to be used.int
Get the parallelism to be used.Predicate
<? super ForkJoinPool> Get the saturate predicate to be used for the execution'sForkJoinPool
.
-
Field Details
-
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
-
-
Constructor Details
-
DefaultParallelExecutionConfiguration
DefaultParallelExecutionConfiguration(int parallelism, int minimumRunnable, int maxPoolSize, int corePoolSize, int keepAliveSeconds, Predicate<? super ForkJoinPool> saturate)
-
-
Method Details
-
getParallelism
public int getParallelism()Description copied from interface:ParallelExecutionConfiguration
Get the parallelism to be used.- Specified by:
getParallelism
in interfaceParallelExecutionConfiguration
- See Also:
-
getMinimumRunnable
public int getMinimumRunnable()Description copied from interface:ParallelExecutionConfiguration
Get the minimum number of runnable threads to be used.- Specified by:
getMinimumRunnable
in interfaceParallelExecutionConfiguration
-
getMaxPoolSize
public int getMaxPoolSize()Description copied from interface:ParallelExecutionConfiguration
Get the maximum thread pool size to be used.- Specified by:
getMaxPoolSize
in interfaceParallelExecutionConfiguration
-
getCorePoolSize
public int getCorePoolSize()Description copied from interface:ParallelExecutionConfiguration
Get the core thread pool size to be used.- Specified by:
getCorePoolSize
in interfaceParallelExecutionConfiguration
-
getKeepAliveSeconds
public int getKeepAliveSeconds()Description copied from interface:ParallelExecutionConfiguration
Get the number of seconds for which inactive threads should be kept alive before terminating them and shrinking the thread pool.- Specified by:
getKeepAliveSeconds
in interfaceParallelExecutionConfiguration
-
getSaturatePredicate
Description copied from interface:ParallelExecutionConfiguration
Get the saturate predicate to be used for the execution'sForkJoinPool
.- Specified by:
getSaturatePredicate
in interfaceParallelExecutionConfiguration
- Returns:
- the saturate predicate to be passed to the
ForkJoinPool
constructor; may benull
- See Also:
-