Example usage for Java java.util.concurrent ForkJoinPool fields, constructors, methods, implement or subclass
The text is from its open source code.
ForkJoinWorkerThreadFactory | defaultForkJoinWorkerThreadFactory Creates a new ForkJoinWorkerThread. |
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) ). |
boolean | awaitTermination(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. |
ForkJoinPool | commonPool() Returns the common pool instance. |
void | execute(ForkJoinTask> task) Arranges for (asynchronous) execution of the given task. |
void | execute(Runnable task) |
int | getActiveThreadCount() Returns an estimate of the number of threads that are currently stealing or executing tasks. |
int | getCommonPoolParallelism() Returns the targeted parallelism level of the common pool. |
int | getParallelism() Returns the targeted parallelism level of this pool. |
int | getQueuedSubmissionCount() Returns an estimate of the number of tasks submitted to this pool that have not yet begun executing. |
T | invoke(ForkJoinTask Performs the given task, returning its result upon completion. |
List | invokeAll(Collection extends Callable |
boolean | isQuiescent() Returns true if all worker threads are currently idle. |
boolean | isShutdown() Returns true if this pool has been shut down. |
List | shutdownNow() Possibly attempts to cancel and/or stop all tasks, and reject all subsequently submitted tasks. |
ForkJoinTask | submit(ForkJoinTask Submits a ForkJoinTask for execution. |
ForkJoinTask | submit(Callable |
ForkJoinTask> | submit(Runnable task) |
String | toString() Returns a string identifying this pool, as well as its state, including indications of run state, parallelism level, and worker and task counts. |