Ja.NET Standard Edition 5.0

Documentation API Specification

Contents

Package java.util.concurrent


Classes

class  CopyOnWriteArrayList< E >
class  AbstractExecutorService
 Provides default implementation of ExecutorService execution methods. More...
class  ArrayBlockingQueue< E >
 A bounded BlockingQueue blocking queue} backed by an array. More...
interface  BlockingQueue< E >
 A java.util.Queue that additionally supports operations that wait for the queue to become non-empty when retrieving an element, and wait for space to become available in the queue when storing an element. More...
class  BrokenBarrierException
 Exception thrown when a thread tries to wait upon a barrier that is in a broken state, or which enters the broken state while the thread is waiting. More...
interface  Callable< V >
 A task that returns a result and may throw an exception. More...
class  CancellationException
 Exception indicating that the result of a value-producing task, such as a FutureTask, cannot be retrieved because the task was cancelled. More...
interface  CompletionService< V >
 A service that decouples the production of new asynchronous tasks from the consumption of the results of completed tasks. More...
class  ConcurrentHashMap< K, V >
 A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updates. More...
class  ConcurrentLinkedQueue< E >
 An unbounded thread-safe Queue queue} based on linked nodes. More...
interface  ConcurrentMap< K, V >
 A java.util.Map providing additional atomic putIfAbsent, remove, and replace methods. More...
class  CopyOnWriteArraySet< E >
 A java.util.Set that uses java.util.concurrent.CopyOnWriteArrayList for all of its operations. More...
class  CountDownLatch
 A synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes. More...
class  CyclicBarrier
 A synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point. More...
class  DelayQueue< E extends Delayed >
 An unbounded BlockingQueue blocking queue} of Delayed elements, in which an element can only be taken when its delay has expired. More...
interface  Delayed
 A mix-in style interface for marking objects that should be acted upon after a given delay. More...
class  Exchanger< V >
 A synchronization point at which two threads can exchange objects. More...
class  ExecutionException
 Exception thrown when attempting to retrieve the result of a task that aborted by throwing an exception. More...
interface  Executor
 An object that executes submitted Runnable tasks. More...
class  ExecutorCompletionService< V >
 A CompletionService that uses a supplied Executor to execute tasks. More...
interface  ExecutorService
 An Executor that provides methods to manage termination and methods that can produce a Future for tracking progress of one or more asynchronous tasks. More...
class  Executors
 Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory, and Callable classes defined in this package. More...
interface  Future< V >
 A Future represents the result of an asynchronous computation. More...
class  FutureTask< V >
 A cancellable asynchronous computation. More...
class  LinkedBlockingQueue< E >
 An optionally-bounded BlockingQueue blocking queue} based on linked nodes. More...
class  PriorityBlockingQueue< E >
 An unbounded BlockingQueue blocking queue} that uses the same ordering rules as class PriorityQueue and supplies blocking retrieval operations. More...
class  RejectedExecutionException
 Exception thrown by an Executor when a task cannot be accepted for execution. More...
interface  RejectedExecutionHandler
 A handler for tasks that cannot be executed by a ThreadPoolExecutor. More...
interface  ScheduledExecutorService
 An ExecutorService that can schedule commands to run after a given delay, or to execute periodically. More...
interface  ScheduledFuture< V >
 A delayed result-bearing action that can be cancelled. More...
class  ScheduledThreadPoolExecutor
 A ThreadPoolExecutor that can additionally schedule commands to run after a given delay, or to execute periodically. More...
class  Semaphore
 A counting semaphore. More...
class  SynchronousQueue< E >
 A BlockingQueue blocking queue} in which each put must wait for a take, and vice versa. More...
interface  ThreadFactory
 An object that creates new threads on demand. More...
class  ThreadPoolExecutor
 An ExecutorService that executes each submitted task using one of possibly several pooled threads, normally configured using Executors factory methods. More...
class  TimeoutException
 Exception thrown when a blocking operation times out. More...

Packages

package  atomic
package  locks

Enumerations

enum  TimeUnit { NANOSECONDS = (0), MICROSECONDS = (1), MILLISECONDS = (2), SECONDS = (3) }
 A TimeUnit represents time durations at a given unit of granularity and provides utility methods to convert across units, and to perform timing and delay operations in these units. More...

Enumeration Type Documentation

enum TimeUnit

A TimeUnit represents time durations at a given unit of granularity and provides utility methods to convert across units, and to perform timing and delay operations in these units.

A TimeUnit does not maintain time information, but only helps organize and use time representations that may be maintained separately across various contexts.

A TimeUnit is mainly used to inform time-based methods how a given timing parameter should be interpreted. For example, the following code will timeout in 50 milliseconds if the lock is not available:

  Lock lock = ...;
  if ( lock.tryLock(50L, TimeUnit.MILLISECONDS) ) ...
 
while this code will timeout in 50 seconds:
  Lock lock = ...;
  if ( lock.tryLock(50L, TimeUnit.SECONDS) ) ...
 

Note however, that there is no guarantee that a particular timeout implementation will be able to notice the passage of time at the same granularity as the given TimeUnit.

Since:
1.5
Author:
Doug Lea
Enumerator:
NANOSECONDS 
MICROSECONDS 
MILLISECONDS 
SECONDS