| Package | Description |
|---|---|
| java.awt |
Contains all of the classes for creating user interfaces and for painting graphics and images.
|
| java.awt.image |
Provides classes for creating and modifying images.
|
| java.lang |
Provides classes that are fundamental to the design of the Java programming language.
|
| java.lang.ref |
Provides reference-object classes, which support a limited degree of interaction with the garbage collector.
|
| java.nio.channels |
Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.
|
| java.nio.file |
Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems.
|
| java.util.concurrent |
Utility classes commonly useful in concurrent programming.
|
| java.util.concurrent.locks |
Interfaces and classes providing a framework for locking and waiting for conditions that is distinct from built-in synchronization and monitors.
|
| javax.swing |
Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
|
| Modifier and Type | Method and Description |
|---|---|
AWTEvent |
EventQueue.getNextEvent()
Removes an event from the
EventQueue and returns it.
|
static void |
EventQueue.invokeAndWait(Runnable
|
void |
MediaTracker.waitForAll()
Starts loading all images tracked by this media tracker.
|
boolean |
MediaTracker.waitForAll(long ms)
Starts loading all images tracked by this media tracker.
|
void |
MediaTracker.waitForID(int id)
Starts loading all images tracked by this media tracker with the specified identifier.
|
boolean |
MediaTracker.waitForID(int id, long ms)
Starts loading all images tracked by this media tracker with the specified identifier.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
PixelGrabber.grabPixels()
Request the Image or ImageProducer to start delivering pixels and wait for all of the pixels in the rectangle of interest to be delivered.
|
boolean |
PixelGrabber.grabPixels(long ms)
Request the Image or ImageProducer to start delivering pixels and wait for all of the pixels in the rectangle of interest to be delivered or until the specified timeout has elapsed.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Thread.join()
Waits for this thread to die.
|
void |
Thread.join(long millis)
Waits at most
millis milliseconds for this thread to die.
|
void |
Thread.join(long millis, int nanos)
Waits at most
millis milliseconds plus
nanos nanoseconds for this thread to die.
|
static void |
Thread.sleep(long millis)
Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds, subject to the precision and accuracy of system timers and schedulers.
|
static void |
Thread.sleep(long millis, int nanos)
Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds plus the specified number of nanoseconds, subject to the precision and accuracy of system timers and schedulers.
|
void |
Object.wait()
Causes the current thread to wait until another thread invokes the
Object method or the
Object method for this object.
|
void |
Object.wait(long timeout)
Causes the current thread to wait until either another thread invokes the
Object method or the
Object method for this object, or a specified amount of time has elapsed.
|
void |
Object.wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
Object method or the
Object method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
|
abstract int |
Process.waitFor()
Causes the current thread to wait, if necessary, until the process represented by this
Process object has terminated.
|
boolean |
Process.waitFor(long timeout, TimeUnit
Causes the current thread to wait, if necessary, until the subprocess represented by this
Process object has terminated, or the specified waiting time elapses.
|
| Modifier and Type | Method and Description |
|---|---|
Reference |
ReferenceQueue.remove()
Removes the next reference object in this queue, blocking until one becomes available.
|
Reference |
ReferenceQueue.remove(long timeout)
Removes the next reference object in this queue, blocking until either one becomes available or the given timeout period expires.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
AsynchronousChannelGroup.awaitTermination(long timeout, TimeUnit
Awaits termination of the group.
|
| Modifier and Type | Method and Description |
|---|---|
WatchKey |
WatchService.poll(long timeout, TimeUnit
Retrieves and removes the next watch key, waiting if necessary up to the specified wait time if none are yet present.
|
WatchKey |
WatchService.take()
Retrieves and removes next watch key, waiting if none are yet present.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Semaphore.acquire()
Acquires a permit from this semaphore, blocking until one is available, or the thread is
interrupted.
|
void |
Semaphore.acquire(int permits)
Acquires the given number of permits from this semaphore, blocking until all are available, or the thread is
interrupted.
|
void |
CountDownLatch.await()
Causes the current thread to wait until the latch has counted down to zero, unless the thread is
interrupted.
|
int |
CyclicBarrier.await()
Waits until all
parties have invoked
await on this barrier.
|
boolean |
CountDownLatch.await(long timeout, TimeUnit
Causes the current thread to wait until the latch has counted down to zero, unless the thread is
interrupted, or the specified waiting time elapses.
|
int |
CyclicBarrier.await(long timeout, TimeUnit
Waits until all
parties have invoked
await on this barrier, or the specified waiting time elapses.
|
int |
Phaser.awaitAdvanceInterruptibly(int phase)
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.
|
int |
Phaser.awaitAdvanceInterruptibly(int phase, long timeout, TimeUnit
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.
|
boolean |
ExecutorService.awaitTermination(long timeout, TimeUnit
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
|
boolean |
ForkJoinPool.awaitTermination(long timeout, TimeUnit
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
|
boolean |
ThreadPoolExecutor.awaitTermination(long timeout, TimeUnit
|
boolean |
ForkJoinPool.ManagedBlocker.block()
Possibly blocks the current thread, for example waiting for a lock or condition.
|
V |
Exchanger.exchange(V x)
Waits for another thread to arrive at this exchange point (unless the current thread is
interrupted), and then transfers the given object to it, receiving its object in return.
|
V |
Exchanger.exchange(V x, long timeout, TimeUnit
Waits for another thread to arrive at this exchange point (unless the current thread is
interrupted or the specified waiting time elapses), and then transfers the given object to it, receiving its object in return.
|
V |
ForkJoinTask.get()
Waits if necessary for the computation to complete, and then retrieves its result.
|
T |
CompletableFuture.get()
Waits if necessary for this future to complete, and then returns its result.
|
V |
Future.get()
Waits if necessary for the computation to complete, and then retrieves its result.
|
V |
FutureTask.get()
|
V |
ForkJoinTask.get(long timeout, TimeUnit
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.
|
T |
CompletableFuture.get(long timeout, TimeUnit
Waits if necessary for at most the given time for this future to complete, and then returns its result, if available.
|
V |
Future.get(long timeout, TimeUnit
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.
|
V |
FutureTask.get(long timeout, TimeUnit
|
<T> List |
ExecutorService.invokeAll(Collection
Executes the given tasks, returning a list of Futures holding their status and results when all complete.
|
<T> List |
AbstractExecutorService.invokeAll(Collection
|
<T> List |
ExecutorService.invokeAll(Collection
Executes the given tasks, returning a list of Futures holding their status and results when all complete or the timeout expires, whichever happens first.
|
<T> List |
AbstractExecutorService.invokeAll(Collection
|
<T> T |
ExecutorService.invokeAny(Collection
Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do.
|
<T> T |
AbstractExecutorService.invokeAny(Collection
|
<T> T |
ExecutorService.invokeAny(Collection
Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do before the given timeout elapses.
|
<T> T |
AbstractExecutorService.invokeAny(Collection
|
static void |
ForkJoinPool.managedBlock(ForkJoinPool
Blocks in accord with the given blocker.
|
boolean |
SynchronousQueue.offer(E e, long timeout, TimeUnit
Inserts the specified element into this queue, waiting if necessary up to the specified wait time for another thread to receive it.
|
boolean |
LinkedBlockingQueue.offer(E e, long timeout, TimeUnit
Inserts the specified element at the tail of this queue, waiting if necessary up to the specified wait time for space to become available.
|
boolean |
BlockingQueue.offer(E e, long timeout, TimeUnit
Inserts the specified element into this queue, waiting up to the specified wait time if necessary for space to become available.
|
boolean |
ArrayBlockingQueue.offer(E e, long timeout, TimeUnit
Inserts the specified element at the tail of this queue, waiting up to the specified wait time for space to become available if the queue is full.
|
boolean |
LinkedBlockingDeque.offer(E e, long timeout, TimeUnit
|
boolean |
BlockingDeque.offer(E e, long timeout, TimeUnit
Inserts the specified element into the queue represented by this deque (in other words, at the tail of this deque), waiting up to the specified wait time if necessary for space to become available.
|
boolean |
LinkedBlockingDeque.offerFirst(E e, long timeout, TimeUnit
|
boolean |
BlockingDeque.offerFirst(E e, long timeout, TimeUnit
Inserts the specified element at the front of this deque, waiting up to the specified wait time if necessary for space to become available.
|
boolean |
LinkedBlockingDeque.offerLast(E e, long timeout, TimeUnit
|
boolean |
BlockingDeque.offerLast(E e, long timeout, TimeUnit
Inserts the specified element at the end of this deque, waiting up to the specified wait time if necessary for space to become available.
|
E |
SynchronousQueue.poll(long timeout, TimeUnit
Retrieves and removes the head of this queue, waiting if necessary up to the specified wait time, for another thread to insert it.
|
E |
LinkedBlockingQueue.poll(long timeout, TimeUnit
|
Future |
ExecutorCompletionService.poll(long timeout, TimeUnit
|
E |
BlockingQueue.poll(long timeout, TimeUnit
Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available.
|
E |
LinkedTransferQueue.poll(long timeout, TimeUnit
|
E |
ArrayBlockingQueue.poll(long timeout, TimeUnit
|
E |
LinkedBlockingDeque.poll(long timeout, TimeUnit
|
E |
DelayQueue.poll(long timeout, TimeUnit
Retrieves and removes the head of this queue, waiting if necessary until an element with an expired delay is available on this queue, or the specified wait time expires.
|
E |
BlockingDeque.poll(long timeout, TimeUnit
Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), waiting up to the specified wait time if necessary for an element to become available.
|
E |
PriorityBlockingQueue.poll(long timeout, TimeUnit
|
Future |
CompletionService.poll(long timeout, TimeUnit
Retrieves and removes the Future representing the next completed task, waiting if necessary up to the specified wait time if none are yet present.
|
E |
LinkedBlockingDeque.pollFirst(long timeout, TimeUnit
|
E |
BlockingDeque.pollFirst(long timeout, TimeUnit
Retrieves and removes the first element of this deque, waiting up to the specified wait time if necessary for an element to become available.
|
E |
LinkedBlockingDeque.pollLast(long timeout, TimeUnit
|
E |
BlockingDeque.pollLast(long timeout, TimeUnit
Retrieves and removes the last element of this deque, waiting up to the specified wait time if necessary for an element to become available.
|
void |
SynchronousQueue.put(E e)
Adds the specified element to this queue, waiting if necessary for another thread to receive it.
|
void |
LinkedBlockingQueue.put(E e)
Inserts the specified element at the tail of this queue, waiting if necessary for space to become available.
|
void |
BlockingQueue.put(E e)
Inserts the specified element into this queue, waiting if necessary for space to become available.
|
void |
ArrayBlockingQueue.put(E e)
Inserts the specified element at the tail of this queue, waiting for space to become available if the queue is full.
|
void |
LinkedBlockingDeque.put(E e)
|
void |
BlockingDeque.put(E e)
Inserts the specified element into the queue represented by this deque (in other words, at the tail of this deque), waiting if necessary for space to become available.
|
void |
LinkedBlockingDeque.putFirst(E e)
|
void |
BlockingDeque.putFirst(E e)
Inserts the specified element at the front of this deque, waiting if necessary for space to become available.
|
void |
LinkedBlockingDeque.putLast(E e)
|
void |
BlockingDeque.putLast(E e)
Inserts the specified element at the end of this deque, waiting if necessary for space to become available.
|
void |
TimeUnit.sleep(long timeout)
Performs a
Thread.sleep using this time unit.
|
E |
SynchronousQueue.take()
Retrieves and removes the head of this queue, waiting if necessary for another thread to insert it.
|
E |
LinkedBlockingQueue.take()
|
Future |
ExecutorCompletionService.take()
|
E |
BlockingQueue.take()
Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.
|
E |
LinkedTransferQueue.take()
|
E |
ArrayBlockingQueue.take()
|
E |
LinkedBlockingDeque.take()
|
E |
DelayQueue.take()
Retrieves and removes the head of this queue, waiting if necessary until an element with an expired delay is available on this queue.
|
E |
BlockingDeque.take()
Retrieves and removes the head of the queue represented by this deque (in other words, the first element of this deque), waiting if necessary until an element becomes available.
|
E |
PriorityBlockingQueue.take()
|
Future |
CompletionService.take()
Retrieves and removes the Future representing the next completed task, waiting if none are yet present.
|
E |
LinkedBlockingDeque.takeFirst()
|
E |
BlockingDeque.takeFirst()
Retrieves and removes the first element of this deque, waiting if necessary until an element becomes available.
|
E |
LinkedBlockingDeque.takeLast()
|
E |
BlockingDeque.takeLast()
Retrieves and removes the last element of this deque, waiting if necessary until an element becomes available.
|
void |
TimeUnit.timedJoin(Thread
Performs a timed
Thread.join using this time unit.
|
void |
TimeUnit.timedWait(Object
Performs a timed
Object.wait using this time unit.
|
void |
LinkedTransferQueue.transfer(E e)
Transfers the element to a consumer, waiting if necessary to do so.
|
void |
TransferQueue.transfer(E e)
Transfers the element to a consumer, waiting if necessary to do so.
|
boolean |
Semaphore.tryAcquire(int permits, long timeout, TimeUnit
Acquires the given number of permits from this semaphore, if all become available within the given waiting time and the current thread has not been
interrupted.
|
boolean |
Semaphore.tryAcquire(long timeout, TimeUnit
Acquires a permit from this semaphore, if one becomes available within the given waiting time and the current thread has not been
interrupted.
|
boolean |
LinkedTransferQueue.tryTransfer(E e, long timeout, TimeUnit
Transfers the element to a consumer if it is possible to do so before the timeout elapses.
|
boolean |
TransferQueue.tryTransfer(E e, long timeout, TimeUnit
Transfers the element to a consumer if it is possible to do so before the timeout elapses.
|
| Modifier and Type | Method and Description |
|---|---|
void |
AbstractQueuedSynchronizer.acquireInterruptibly(int arg)
Acquires in exclusive mode, aborting if interrupted.
|
void |
AbstractQueuedLongSynchronizer.acquireInterruptibly(long arg)
Acquires in exclusive mode, aborting if interrupted.
|
void |
AbstractQueuedSynchronizer.acquireSharedInterruptibly(int arg)
Acquires in shared mode, aborting if interrupted.
|
void |
AbstractQueuedLongSynchronizer.acquireSharedInterruptibly(long arg)
Acquires in shared mode, aborting if interrupted.
|
void |
AbstractQueuedSynchronizer.ConditionObject.await()
Implements interruptible condition wait.
|
void |
Condition.await()
Causes the current thread to wait until it is signalled or
interrupted.
|
void |
AbstractQueuedLongSynchronizer.ConditionObject.await()
Implements interruptible condition wait.
|
boolean |
AbstractQueuedSynchronizer.ConditionObject.await(long time, TimeUnit
Implements timed condition wait.
|
boolean |
Condition.await(long time, TimeUnit
Causes the current thread to wait until it is signalled or interrupted, or the specified waiting time elapses.
|
boolean |
AbstractQueuedLongSynchronizer.ConditionObject.await(long time, TimeUnit
Implements timed condition wait.
|
long |
AbstractQueuedSynchronizer.ConditionObject.awaitNanos(long nanosTimeout)
Implements timed condition wait.
|
long |
Condition.awaitNanos(long nanosTimeout)
Causes the current thread to wait until it is signalled or interrupted, or the specified waiting time elapses.
|
long |
AbstractQueuedLongSynchronizer.ConditionObject.awaitNanos(long nanosTimeout)
Implements timed condition wait.
|
boolean |
AbstractQueuedSynchronizer.ConditionObject.awaitUntil(Date
Implements absolute timed condition wait.
|
boolean |
Condition.awaitUntil(Date
Causes the current thread to wait until it is signalled or interrupted, or the specified deadline elapses.
|
boolean |
AbstractQueuedLongSynchronizer.ConditionObject.awaitUntil(Date
Implements absolute timed condition wait.
|
void |
Lock.lockInterruptibly()
Acquires the lock unless the current thread is
interrupted.
|
void |
ReentrantLock.lockInterruptibly()
Acquires the lock unless the current thread is
interrupted.
|
void |
ReentrantReadWriteLock.ReadLock.lockInterruptibly()
Acquires the read lock unless the current thread is
interrupted.
|
void |
ReentrantReadWriteLock.WriteLock.lockInterruptibly()
Acquires the write lock unless the current thread is
interrupted.
|
long |
StampedLock.readLockInterruptibly()
Non-exclusively acquires the lock, blocking if necessary until available or the current thread is interrupted.
|
boolean |
AbstractQueuedSynchronizer.tryAcquireNanos(int arg, long nanosTimeout)
Attempts to acquire in exclusive mode, aborting if interrupted, and failing if the given timeout elapses.
|
boolean |
AbstractQueuedLongSynchronizer.tryAcquireNanos(long arg, long nanosTimeout)
Attempts to acquire in exclusive mode, aborting if interrupted, and failing if the given timeout elapses.
|
boolean |
AbstractQueuedSynchronizer.tryAcquireSharedNanos(int arg, long nanosTimeout)
Attempts to acquire in shared mode, aborting if interrupted, and failing if the given timeout elapses.
|
boolean |
AbstractQueuedLongSynchronizer.tryAcquireSharedNanos(long arg, long nanosTimeout)
Attempts to acquire in shared mode, aborting if interrupted, and failing if the given timeout elapses.
|
boolean |
Lock.tryLock(long time, TimeUnit
Acquires the lock if it is free within the given waiting time and the current thread has not been
interrupted.
|
boolean |
ReentrantLock.tryLock(long timeout, TimeUnit
Acquires the lock if it is not held by another thread within the given waiting time and the current thread has not been
interrupted.
|
boolean |
ReentrantReadWriteLock.ReadLock.tryLock(long timeout, TimeUnit
Acquires the read lock if the write lock is not held by another thread within the given waiting time and the current thread has not been
interrupted.
|
boolean |
ReentrantReadWriteLock.WriteLock.tryLock(long timeout, TimeUnit
Acquires the write lock if it is not held by another thread within the given waiting time and the current thread has not been
interrupted.
|
long |
StampedLock.tryReadLock(long time, TimeUnit
Non-exclusively acquires the lock if it is available within the given time and the current thread has not been interrupted.
|
long |
StampedLock.tryWriteLock(long time, TimeUnit
Exclusively acquires the lock if it is available within the given time and the current thread has not been interrupted.
|
long |
StampedLock.writeLockInterruptibly()
Exclusively acquires the lock, blocking if necessary until available or the current thread is interrupted.
|
| Modifier and Type | Method and Description |
|---|---|
T |
SwingWorker.get()
Waits if necessary for the computation to complete, and then retrieves its result.
|
T |
SwingWorker.get(long timeout, TimeUnit
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.
|
static void |
SwingUtilities.invokeAndWait(Runnable
Causes
doRun.run() to be executed synchronously on the AWT event dispatching thread.
|