Example usage for java.util.concurrent ForkJoinPool getCommonPoolParallelism

List of usage examples for java.util.concurrent ForkJoinPool getCommonPoolParallelism

Introduction

In this page you can find the example usage for java.util.concurrent ForkJoinPool getCommonPoolParallelism.

Prototype

public static int getCommonPoolParallelism() 

Source Link

Document

Returns the targeted parallelism level of the common pool.

Usage

From source file:com.eventsourcing.hlc.NTPServerTimeProviderTest.java

@DataProvider(name = "delays", parallel = true)
public static Iterator<Object[]> delays() {
    return IntStream.generate(() -> new Random().nextInt(3000))
            .limit(ForkJoinPool.getCommonPoolParallelism() * 10).boxed().map(i -> new Object[] { i })
            .collect(Collectors.toList()).iterator();
}