Java java.util.concurrent ForkJoinPool fields, constructors, methods, implement or subclass

Example usage for Java java.util.concurrent ForkJoinPool fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util.concurrent ForkJoinPool.

The text is from its open source code.

Field

ForkJoinWorkerThreadFactorydefaultForkJoinWorkerThreadFactory
Creates a new ForkJoinWorkerThread.

Constructor

ForkJoinPool()
Creates a ForkJoinPool with parallelism equal to java.lang.Runtime#availableProcessors , using defaults for all other parameters (see #ForkJoinPool(int,ForkJoinWorkerThreadFactory,UncaughtExceptionHandler,boolean,int,int,int,Predicate,long,TimeUnit) ).
ForkJoinPool(int parallelism)
Creates a ForkJoinPool with the indicated parallelism level, using defaults for all other parameters (see #ForkJoinPool(int,ForkJoinWorkerThreadFactory,UncaughtExceptionHandler,boolean,int,int,int,Predicate,long,TimeUnit) ).
ForkJoinPool(byte forCommonPoolOnly)
Constructor for common pool using parameters possibly overridden by system properties
ForkJoinPool(int parallelism, ForkJoinWorkerThreadFactory factory, UncaughtExceptionHandler handler, boolean asyncMode)
Creates a ForkJoinPool with the given parameters (using defaults for others -- see #ForkJoinPool(int,ForkJoinWorkerThreadFactory,UncaughtExceptionHandler,boolean,int,int,int,Predicate,long,TimeUnit) ).

Method

booleanawaitTermination(long timeout, TimeUnit unit)
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
ForkJoinPoolcommonPool()
Returns the common pool instance.
voidexecute(ForkJoinTask task)
Arranges for (asynchronous) execution of the given task.
voidexecute(Runnable task)
intgetActiveThreadCount()
Returns an estimate of the number of threads that are currently stealing or executing tasks.
intgetCommonPoolParallelism()
Returns the targeted parallelism level of the common pool.
intgetParallelism()
Returns the targeted parallelism level of this pool.
intgetQueuedSubmissionCount()
Returns an estimate of the number of tasks submitted to this pool that have not yet begun executing.
Tinvoke(ForkJoinTask task)
Performs the given task, returning its result upon completion.
List>invokeAll(Collection> tasks)
booleanisQuiescent()
Returns true if all worker threads are currently idle.
booleanisShutdown()
Returns true if this pool has been shut down.
ListshutdownNow()
Possibly attempts to cancel and/or stop all tasks, and reject all subsequently submitted tasks.
ForkJoinTasksubmit(ForkJoinTask task)
Submits a ForkJoinTask for execution.
ForkJoinTasksubmit(Callable task)
ForkJoinTasksubmit(Runnable task)
StringtoString()
Returns a string identifying this pool, as well as its state, including indications of run state, parallelism level, and worker and task counts.