public boolean awaitQuiescence(long timeout, TimeUnit unit) |
This method executes pool until the pool is quiescent, otherwise, assist performing tasks until specified time value and unit elapses or the pool is quiescent. |
public boolean awaitTermination(long timeout, TimeUnit unit) |
This method blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first. |
public static ForkJoinPool commonPool() |
This method returns the common pool instance. |
public void execute(Runnable task) |
This method executes the given command at some time in the future. |
public int getActiveThreadCount() |
This method returns an estimated number of threads that are currently stealing or executing tasks. It may overestimate the number of active threads. |
public boolean getAsyncMode() |
This method returns true if this pool uses local first-in-first-out scheduling mode for forked tasks that are never joined. |
public static int getCommonPoolParallelism() |
This method returns the targeted parallelism level of the common pool. |
public ForkJoinPool.ForkJoinWorkerThreadFactory getFactory() |
This method returns the factory used for constructing new workers. |
public int getParallelism() |
This method returns the targeted parallelism level of this pool. |
public int getPoolSize() |
This method returns the number of worker threads that have started but not yet terminated. |
public int getQueuedSubmissionCount() |
This method returns an estimate of the number of tasks submitted to this pool that have not yet begun executing. |
public long getQueuedTaskCount() |
This method returns an estimate of the total number of tasks currently held in queues by worker threads |
public int getRunningThreadCount() |
This method returns an estimate of the number of worker threads that are not blocked waiting to join tasks or for other managed synchronization. |
public long getStealCount() |
This method returns an estimate of the total number of tasks stolen from one thread’s work queue by another. |
public Thread.UncaughtExceptionHandler getUncaughtExceptionHandler() |
This method returns the handler for internal worker threads that terminate due to unrecoverable errors encountered while executing tasks. |
public boolean hasQueuedSubmissions() |
This method returns true if there are any tasks submitted to this pool that have not yet begun executing. |
public <T> T invoke(ForkJoinTask<T> task) |
This method performs the given task and returns its result upon completion. |
public boolean isQuiescent() |
This method returns true if all worker threads are currently idle. |
public boolean isShutdown() |
This method returns true if the pool calling isShutdown() has been shut down. |
public boolean isTerminated() |
This method returns true if all tasks have completed following shut down. |
public boolean isTerminating() |
This method returns true if the process of termination has started but not yet completed. |
protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) |
This method returns a RunnableFuture which, when run, will call the underlying callable and which, as a Future, will yield the callable’s result as its result and provide for cancellation of the underlying task. |
public void shutdown() |
This method returns true if this pool has been shut down. |
public List<Runnable> shutdownNow() |
This method possibly attempts to cancel and/or stop all tasks, and reject all subsequently submitted tasks. |
public ForkJoinTask<?> submit(Runnable task) |
This method submits a Runnable task for execution and returns a Future representing that task. |
public String toString() |
This method returns a string identifying this pool, as well as its state, including indications of run state, parallelism level, and worker and task counts. |