- adapt(Runnable) - Static method in class jsr166y.ForkJoinTask
-
Returns a new
ForkJoinTask
that performs the
run
method of the given
Runnable
as its action, and returns
a null result upon
ForkJoinTask.join()
.
- adapt(Runnable, T) - Static method in class jsr166y.ForkJoinTask
-
Returns a new
ForkJoinTask
that performs the
run
method of the given
Runnable
as its action, and returns
the given result upon
ForkJoinTask.join()
.
- adapt(Callable<? extends T>) - Static method in class jsr166y.ForkJoinTask
-
Returns a new
ForkJoinTask
that performs the
call
method of the given
Callable
as its action, and returns
its result upon
ForkJoinTask.join()
, translating any checked exceptions
encountered into
RuntimeException
.
- add(E) - Method in class jsr166y.LinkedTransferQueue
-
Inserts the specified element at the tail of this queue.
- arrive() - Method in class jsr166y.Phaser
-
Arrives at this phaser, without waiting for others to arrive.
- arriveAndAwaitAdvance() - Method in class jsr166y.Phaser
-
Arrives at this phaser and awaits others.
- arriveAndDeregister() - Method in class jsr166y.Phaser
-
Arrives at this phaser and deregisters from it without waiting
for others to arrive.
- awaitAdvance(int) - Method in class jsr166y.Phaser
-
Awaits the phase of this phaser to advance from the given phase
value, returning immediately if the current phase is not equal
to the given phase value or this phaser is terminated.
- awaitAdvanceInterruptibly(int) - Method in class jsr166y.Phaser
-
Awaits the phase of this phaser to advance from the given phase
value, throwing InterruptedException
if interrupted
while waiting, or returning immediately if the current phase is
not equal to the given phase value or this phaser is
terminated.
- awaitAdvanceInterruptibly(int, long, TimeUnit) - Method in class jsr166y.Phaser
-
Awaits the phase of this phaser to advance from the given phase
value or the given timeout to elapse, throwing InterruptedException
if interrupted while waiting, or
returning immediately if the current phase is not equal to the
given phase value or this phaser is terminated.
- awaitTermination(long, TimeUnit) - Method in class jsr166y.ForkJoinPool
-
Blocks until all tasks have completed execution after a shutdown
request, or the timeout occurs, or the current thread is
interrupted, whichever happens first.
- get() - Method in class jsr166y.ForkJoinTask
-
Waits if necessary for the computation to complete, and then
retrieves its result.
- get(long, TimeUnit) - Method in class jsr166y.ForkJoinTask
-
Waits if necessary for at most the given time for the computation
to complete, and then retrieves its result, if available.
- getActiveThreadCount() - Method in class jsr166y.ForkJoinPool
-
Returns an estimate of the number of threads that are currently
stealing or executing tasks.
- getArrivedParties() - Method in class jsr166y.Phaser
-
Returns the number of registered parties that have arrived at
the current phase of this phaser.
- getAsyncMode() - Method in class jsr166y.ForkJoinPool
-
Returns true
if this pool uses local first-in-first-out
scheduling mode for forked tasks that are never joined.
- getException() - Method in class jsr166y.ForkJoinTask
-
Returns the exception thrown by the base computation, or a
CancellationException
if cancelled, or null
if
none or if the method has not yet completed.
- getFactory() - Method in class jsr166y.ForkJoinPool
-
Returns the factory used for constructing new workers.
- getParallelism() - Method in class jsr166y.ForkJoinPool
-
Returns the targeted parallelism level of this pool.
- getParent() - Method in class jsr166y.Phaser
-
Returns the parent of this phaser, or null
if none.
- getPhase() - Method in class jsr166y.Phaser
-
Returns the current phase number.
- getPool() - Static method in class jsr166y.ForkJoinTask
-
Returns the pool hosting the current task execution, or null
if this task is executing outside of any ForkJoinPool.
- getPool() - Method in class jsr166y.ForkJoinWorkerThread
-
Returns the pool hosting this thread.
- getPoolIndex() - Method in class jsr166y.ForkJoinWorkerThread
-
Returns the index number of this thread in its pool.
- getPoolSize() - Method in class jsr166y.ForkJoinPool
-
Returns the number of worker threads that have started but not
yet terminated.
- getQueuedSubmissionCount() - Method in class jsr166y.ForkJoinPool
-
Returns an estimate of the number of tasks submitted to this
pool that have not yet begun executing.
- getQueuedTaskCount() - Method in class jsr166y.ForkJoinPool
-
Returns an estimate of the total number of tasks currently held
in queues by worker threads (but not including tasks submitted
to the pool that have not begun executing).
- getQueuedTaskCount() - Static method in class jsr166y.ForkJoinTask
-
Returns an estimate of the number of tasks that have been
forked by the current worker thread but not yet executed.
- getRawResult() - Method in class jsr166y.ForkJoinTask
-
Returns the result that would be returned by
ForkJoinTask.join()
, even
if this task completed abnormally, or
null
if this task
is not known to have been completed.
- getRawResult() - Method in class jsr166y.RecursiveAction
-
Always returns null
.
- getRawResult() - Method in class jsr166y.RecursiveTask
-
- getRegisteredParties() - Method in class jsr166y.Phaser
-
Returns the number of parties registered at this phaser.
- getRoot() - Method in class jsr166y.Phaser
-
Returns the root ancestor of this phaser, which is the same as
this phaser if it has no parent.
- getRunningThreadCount() - Method in class jsr166y.ForkJoinPool
-
Returns an estimate of the number of worker threads that are
not blocked waiting to join tasks or for other managed
synchronization.
- getStealCount() - Method in class jsr166y.ForkJoinPool
-
Returns an estimate of the total number of tasks stolen from
one thread's work queue by another.
- getSurplusQueuedTaskCount() - Static method in class jsr166y.ForkJoinTask
-
Returns an estimate of how many more locally queued tasks are
held by the current worker thread than there are other worker
threads that might steal them.
- getUnarrivedParties() - Method in class jsr166y.Phaser
-
Returns the number of registered parties that have not yet
arrived at the current phase of this phaser.
- getUncaughtExceptionHandler() - Method in class jsr166y.ForkJoinPool
-
Returns the handler for internal worker threads that terminate
due to unrecoverable errors encountered while executing tasks.
- getWaitingConsumerCount() - Method in class jsr166y.LinkedTransferQueue
-
- getWaitingConsumerCount() - Method in interface jsr166y.TransferQueue
-
Returns an estimate of the number of consumers waiting to
receive elements via BlockingQueue.take()
or timed
poll
.
- inForkJoinPool() - Static method in class jsr166y.ForkJoinTask
-
Returns
true
if the current thread is a
ForkJoinWorkerThread
executing as a ForkJoinPool computation.
- invoke(ForkJoinTask<T>) - Method in class jsr166y.ForkJoinPool
-
Performs the given task, returning its result upon completion.
- invoke() - Method in class jsr166y.ForkJoinTask
-
Commences performing this task, awaits its completion if
necessary, and returns its result, or throws an (unchecked)
RuntimeException
or Error
if the underlying
computation did so.
- invokeAll(Collection<? extends Callable<T>>) - Method in class jsr166y.ForkJoinPool
-
- invokeAll(ForkJoinTask<?>, ForkJoinTask<?>) - Static method in class jsr166y.ForkJoinTask
-
Forks the given tasks, returning when isDone
holds for
each task or an (unchecked) exception is encountered, in which
case the exception is rethrown.
- invokeAll(ForkJoinTask<?>...) - Static method in class jsr166y.ForkJoinTask
-
Forks the given tasks, returning when isDone
holds for
each task or an (unchecked) exception is encountered, in which
case the exception is rethrown.
- invokeAll(Collection<T>) - Static method in class jsr166y.ForkJoinTask
-
Forks all tasks in the specified collection, returning when
isDone
holds for each task or an (unchecked) exception
is encountered, in which case the exception is rethrown.
- isCancelled() - Method in class jsr166y.ForkJoinTask
-
- isCompletedAbnormally() - Method in class jsr166y.ForkJoinTask
-
Returns true
if this task threw an exception or was cancelled.
- isCompletedNormally() - Method in class jsr166y.ForkJoinTask
-
Returns true
if this task completed without throwing an
exception and was not cancelled.
- isDone() - Method in class jsr166y.ForkJoinTask
-
- isEmpty() - Method in class jsr166y.LinkedTransferQueue
-
Returns true
if this queue contains no elements.
- isQuiescent() - Method in class jsr166y.ForkJoinPool
-
Returns true
if all worker threads are currently idle.
- isReleasable() - Method in interface jsr166y.ForkJoinPool.ManagedBlocker
-
Returns true
if blocking is unnecessary.
- isShutdown() - Method in class jsr166y.ForkJoinPool
-
Returns true
if this pool has been shut down.
- isTerminated() - Method in class jsr166y.ForkJoinPool
-
Returns true
if all tasks have completed following shut down.
- isTerminated() - Method in class jsr166y.Phaser
-
Returns true
if this phaser has been terminated.
- isTerminating() - Method in class jsr166y.ForkJoinPool
-
Returns true
if the process of termination has
commenced but not yet completed.
- iterator() - Method in class jsr166y.LinkedTransferQueue
-
Returns an iterator over the elements in this queue in proper
sequence, from head to tail.
- peek() - Method in class jsr166y.LinkedTransferQueue
-
- peekNextLocalTask() - Static method in class jsr166y.ForkJoinTask
-
Returns, but does not unschedule or execute, a task queued by
the current thread but not yet executed, if one is immediately
available.
- Phaser - Class in jsr166y
-
A reusable synchronization barrier, similar in functionality to
CyclicBarrier
and
CountDownLatch
but supporting more flexible usage.
- Phaser() - Constructor for class jsr166y.Phaser
-
Creates a new phaser with no initially registered parties, no
parent, and initial phase number 0.
- Phaser(int) - Constructor for class jsr166y.Phaser
-
Creates a new phaser with the given number of registered
unarrived parties, no parent, and initial phase number 0.
- Phaser(Phaser) - Constructor for class jsr166y.Phaser
-
- Phaser(Phaser, int) - Constructor for class jsr166y.Phaser
-
Creates a new phaser with the given parent and number of
registered unarrived parties.
- poll(long, TimeUnit) - Method in class jsr166y.LinkedTransferQueue
-
- poll() - Method in class jsr166y.LinkedTransferQueue
-
- pollNextLocalTask() - Static method in class jsr166y.ForkJoinTask
-
Unschedules and returns, without executing, the next task
queued by the current thread but not yet executed.
- pollSubmission() - Method in class jsr166y.ForkJoinPool
-
Removes and returns the next unexecuted submission if one is
available.
- pollTask() - Static method in class jsr166y.ForkJoinTask
-
Unschedules and returns, without executing, the next task
queued by the current thread but not yet executed, if one is
available, or if not available, a task that was forked by some
other thread, if available.
- put(E) - Method in class jsr166y.LinkedTransferQueue
-
Inserts the specified element at the tail of this queue.
- take() - Method in class jsr166y.LinkedTransferQueue
-
- ThreadLocalRandom - Class in jsr166y
-
A random number generator isolated to the current thread.
- toString() - Method in class jsr166y.ForkJoinPool
-
Returns a string identifying this pool, as well as its state,
including indications of run state, parallelism level, and
worker and task counts.
- toString() - Method in class jsr166y.Phaser
-
Returns a string identifying this phaser, as well as its
state.
- transfer(E) - Method in class jsr166y.LinkedTransferQueue
-
Transfers the element to a consumer, waiting if necessary to do so.
- transfer(E) - Method in interface jsr166y.TransferQueue
-
Transfers the element to a consumer, waiting if necessary to do so.
- TransferQueue<E> - Interface in jsr166y
-
A BlockingQueue
in which producers may wait for consumers
to receive elements.
- tryTransfer(E) - Method in class jsr166y.LinkedTransferQueue
-
Transfers the element to a waiting consumer immediately, if possible.
- tryTransfer(E, long, TimeUnit) - Method in class jsr166y.LinkedTransferQueue
-
Transfers the element to a consumer if it is possible to do so
before the timeout elapses.
- tryTransfer(E) - Method in interface jsr166y.TransferQueue
-
Transfers the element to a waiting consumer immediately, if possible.
- tryTransfer(E, long, TimeUnit) - Method in interface jsr166y.TransferQueue
-
Transfers the element to a consumer if it is possible to do so
before the timeout elapses.
- tryUnfork() - Method in class jsr166y.ForkJoinTask
-
Tries to unschedule this task for execution.