Uses of Class
java.lang.InterruptedException
Packages that use InterruptedException
Package
Description
This package defines JDI events and event processing.
Contains all of the classes for creating user interfaces and for painting
graphics and images.
Provides classes for creating and modifying images.
Provides classes that are fundamental to the design of the Java
programming language.
Provides reference-object classes, which support a limited degree
of interaction with the garbage collector.
HTTP Client and WebSocket APIs
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.
Defines interfaces and classes for the Java virtual machine to access files,
file attributes, and file systems.
Utility classes commonly useful in concurrent programming.
Interfaces and classes providing a framework for locking and waiting
for conditions that is distinct from built-in synchronization and
monitors.
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
This package contains classes for consuming Flight Recorder data.
This package contains classes to control and monitor Flight Recorder over Java Management Extensions (JMX).
-
Uses of InterruptedException in com.sun.jdi.event
Methods in com.sun.jdi.event that throw InterruptedException -
Uses of InterruptedException in java.awt
Methods in java.awt that throw InterruptedExceptionModifier and TypeMethodDescriptionEventQueue.getNextEvent()Removes an event from theEventQueueand returns it.static voidEventQueue.invokeAndWait(Runnable runnable) voidMediaTracker.waitForAll()Starts loading all images tracked by this media tracker.booleanMediaTracker.waitForAll(long ms) Starts loading all images tracked by this media tracker.voidMediaTracker.waitForID(int id) Starts loading all images tracked by this media tracker with the specified identifier.booleanMediaTracker.waitForID(int id, long ms) Starts loading all images tracked by this media tracker with the specified identifier. -
Uses of InterruptedException in java.awt.image
Methods in java.awt.image that throw InterruptedExceptionModifier and TypeMethodDescriptionbooleanPixelGrabber.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.booleanPixelGrabber.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. -
Uses of InterruptedException in java.lang
Methods in java.lang that throw InterruptedExceptionModifier and TypeMethodDescriptionfinal voidThread.join()Waits for this thread to die.final voidThread.join(long millis) Waits at mostmillismilliseconds for this thread to die.final voidThread.join(long millis, int nanos) Waits at mostmillismilliseconds plusnanosnanoseconds for this thread to die.static voidThread.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 voidThread.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.final voidObject.wait()Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final voidObject.wait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.final voidObject.wait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.abstract intProcess.waitFor()Causes the current thread to wait, if necessary, until the process represented by thisProcessobject has terminated.booleanCauses the current thread to wait, if necessary, until the process represented by thisProcessobject has terminated, or the specified waiting time elapses. -
Uses of InterruptedException in java.lang.ref
Methods in java.lang.ref that throw InterruptedExceptionModifier and TypeMethodDescriptionReferenceQueue.remove()Removes the next reference object in this queue, blocking until one becomes available.ReferenceQueue.remove(long timeout) Removes the next reference object in this queue, blocking until either one becomes available or the given timeout period expires. -
Uses of InterruptedException in java.net.http
Methods in java.net.http that throw InterruptedExceptionModifier and TypeMethodDescriptionabstract <T> HttpResponse<T>HttpClient.send(HttpRequest request, HttpResponse.BodyHandler<T> responseBodyHandler) Sends the given request using this client, blocking if necessary to get the response. -
Uses of InterruptedException in java.nio.channels
Methods in java.nio.channels that throw InterruptedExceptionModifier and TypeMethodDescriptionabstract booleanAsynchronousChannelGroup.awaitTermination(long timeout, TimeUnit unit) Awaits termination of the group. -
Uses of InterruptedException in java.nio.file
Methods in java.nio.file that throw InterruptedExceptionModifier and TypeMethodDescriptionRetrieves and removes the next watch key, waiting if necessary up to the specified wait time if none are yet present.WatchService.take()Retrieves and removes next watch key, waiting if none are yet present. -
Uses of InterruptedException in java.util.concurrent
Methods in java.util.concurrent that throw InterruptedExceptionModifier and TypeMethodDescriptionvoidSemaphore.acquire()Acquires a permit from this semaphore, blocking until one is available, or the thread is interrupted.voidSemaphore.acquire(int permits) Acquires the given number of permits from this semaphore, blocking until all are available, or the thread is interrupted.voidCountDownLatch.await()Causes the current thread to wait until the latch has counted down to zero, unless the thread is interrupted.booleanCauses the current thread to wait until the latch has counted down to zero, unless the thread is interrupted, or the specified waiting time elapses.intCyclicBarrier.await()Waits until all parties have invokedawaiton this barrier.intWaits until all parties have invokedawaiton this barrier, or the specified waiting time elapses.intPhaser.awaitAdvanceInterruptibly(int phase) Awaits the phase of this phaser to advance from the given phase value, throwingInterruptedExceptionif interrupted while waiting, or returning immediately if the current phase is not equal to the given phase value or this phaser is terminated.intPhaser.awaitAdvanceInterruptibly(int phase, long timeout, TimeUnit unit) Awaits the phase of this phaser to advance from the given phase value or the given timeout to elapse, throwingInterruptedExceptionif interrupted while waiting, or returning immediately if the current phase is not equal to the given phase value or this phaser is terminated.booleanExecutorService.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.booleanForkJoinPool.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.booleanThreadPoolExecutor.awaitTermination(long timeout, TimeUnit unit) booleanForkJoinPool.ManagedBlocker.block()Possibly blocks the current thread, for example waiting for a lock or condition.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.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.CompletableFuture.get()Waits if necessary for this future to complete, and then returns its result.Waits if necessary for at most the given time for this future to complete, and then returns its result, if available.final VForkJoinTask.get()Waits if necessary for the computation to complete, and then retrieves its result.final VWaits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.Future.get()Waits if necessary for the computation to complete, and then retrieves its result.Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.FutureTask.get()AbstractExecutorService.invokeAll(Collection<? extends Callable<T>> tasks) AbstractExecutorService.invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) ExecutorService.invokeAll(Collection<? extends Callable<T>> tasks) Executes the given tasks, returning a list of Futures holding their status and results when all complete.ExecutorService.invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) 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> TAbstractExecutorService.invokeAny(Collection<? extends Callable<T>> tasks) <T> TAbstractExecutorService.invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) <T> TExecutorService.invokeAny(Collection<? extends Callable<T>> tasks) Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do.<T> TExecutorService.invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) 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.static voidForkJoinPool.managedBlock(ForkJoinPool.ManagedBlocker blocker) Runs the given possibly blocking task.booleanInserts 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.booleanInserts 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.booleanInserts the specified element into this queue, waiting up to the specified wait time if necessary for space to become available.booleanbooleanInserts the specified element at the tail of this queue, waiting if necessary up to the specified wait time for space to become available.booleanInserts the specified element into this queue, waiting if necessary up to the specified wait time for another thread to receive it.booleanBlockingDeque.offerFirst(E e, long timeout, TimeUnit unit) Inserts the specified element at the front of this deque, waiting up to the specified wait time if necessary for space to become available.booleanLinkedBlockingDeque.offerFirst(E e, long timeout, TimeUnit unit) booleanInserts the specified element at the end of this deque, waiting up to the specified wait time if necessary for space to become available.booleanRetrieves 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.Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available.Retrieves and removes the Future representing the next completed task, waiting if necessary up to the specified wait time if none are yet present.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.Retrieves and removes the head of this queue, waiting if necessary up to the specified wait time, for another thread to insert it.Retrieves and removes the first element of this deque, waiting up to the specified wait time if necessary for an element to become available.Retrieves and removes the last element of this deque, waiting up to the specified wait time if necessary for an element to become available.voidInserts the specified element at the tail of this queue, waiting for space to become available if the queue is full.voidInserts 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.voidInserts the specified element into this queue, waiting if necessary for space to become available.voidvoidInserts the specified element at the tail of this queue, waiting if necessary for space to become available.voidAdds the specified element to this queue, waiting if necessary for another thread to receive it.voidInserts the specified element at the front of this deque, waiting if necessary for space to become available.voidvoidInserts the specified element at the end of this deque, waiting if necessary for space to become available.voidvoidTimeUnit.sleep(long timeout) Performs aThread.sleepusing this time unit.ArrayBlockingQueue.take()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.BlockingQueue.take()Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.CompletionService.take()Retrieves and removes the Future representing the next completed task, waiting if none are yet present.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.ExecutorCompletionService.take()LinkedBlockingDeque.take()LinkedBlockingQueue.take()LinkedTransferQueue.take()PriorityBlockingQueue.take()SynchronousQueue.take()Retrieves and removes the head of this queue, waiting if necessary for another thread to insert it.BlockingDeque.takeFirst()Retrieves and removes the first element of this deque, waiting if necessary until an element becomes available.LinkedBlockingDeque.takeFirst()BlockingDeque.takeLast()Retrieves and removes the last element of this deque, waiting if necessary until an element becomes available.LinkedBlockingDeque.takeLast()voidPerforms a timedThread.joinusing this time unit.voidPerforms a timedObject.waitusing this time unit.voidTransfers the element to a consumer, waiting if necessary to do so.voidTransfers the element to a consumer, waiting if necessary to do so.booleanSemaphore.tryAcquire(int permits, long timeout, TimeUnit unit) 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.booleanSemaphore.tryAcquire(long timeout, TimeUnit unit) Acquires a permit from this semaphore, if one becomes available within the given waiting time and the current thread has not been interrupted.booleanLinkedTransferQueue.tryTransfer(E e, long timeout, TimeUnit unit) Transfers the element to a consumer if it is possible to do so before the timeout elapses.booleanTransferQueue.tryTransfer(E e, long timeout, TimeUnit unit) Transfers the element to a consumer if it is possible to do so before the timeout elapses. -
Uses of InterruptedException in java.util.concurrent.locks
Methods in java.util.concurrent.locks that throw InterruptedExceptionModifier and TypeMethodDescriptionfinal voidAbstractQueuedLongSynchronizer.acquireInterruptibly(long arg) Acquires in exclusive mode, aborting if interrupted.final voidAbstractQueuedSynchronizer.acquireInterruptibly(int arg) Acquires in exclusive mode, aborting if interrupted.final voidAbstractQueuedLongSynchronizer.acquireSharedInterruptibly(long arg) Acquires in shared mode, aborting if interrupted.final voidAbstractQueuedSynchronizer.acquireSharedInterruptibly(int arg) Acquires in shared mode, aborting if interrupted.final voidAbstractQueuedLongSynchronizer.ConditionObject.await()Implements interruptible condition wait.final booleanImplements timed condition wait.final voidAbstractQueuedSynchronizer.ConditionObject.await()Implements interruptible condition wait.final booleanImplements timed condition wait.voidCondition.await()Causes the current thread to wait until it is signalled or interrupted.booleanCauses the current thread to wait until it is signalled or interrupted, or the specified waiting time elapses.final longAbstractQueuedLongSynchronizer.ConditionObject.awaitNanos(long nanosTimeout) Implements timed condition wait.final longAbstractQueuedSynchronizer.ConditionObject.awaitNanos(long nanosTimeout) Implements timed condition wait.longCondition.awaitNanos(long nanosTimeout) Causes the current thread to wait until it is signalled or interrupted, or the specified waiting time elapses.final booleanAbstractQueuedLongSynchronizer.ConditionObject.awaitUntil(Date deadline) Implements absolute timed condition wait.final booleanAbstractQueuedSynchronizer.ConditionObject.awaitUntil(Date deadline) Implements absolute timed condition wait.booleanCondition.awaitUntil(Date deadline) Causes the current thread to wait until it is signalled or interrupted, or the specified deadline elapses.voidLock.lockInterruptibly()Acquires the lock unless the current thread is interrupted.voidReentrantLock.lockInterruptibly()Acquires the lock unless the current thread is interrupted.voidReentrantReadWriteLock.ReadLock.lockInterruptibly()Acquires the read lock unless the current thread is interrupted.voidReentrantReadWriteLock.WriteLock.lockInterruptibly()Acquires the write lock unless the current thread is interrupted.longStampedLock.readLockInterruptibly()Non-exclusively acquires the lock, blocking if necessary until available or the current thread is interrupted.final booleanAbstractQueuedLongSynchronizer.tryAcquireNanos(long arg, long nanosTimeout) Attempts to acquire in exclusive mode, aborting if interrupted, and failing if the given timeout elapses.final booleanAbstractQueuedSynchronizer.tryAcquireNanos(int arg, long nanosTimeout) Attempts to acquire in exclusive mode, aborting if interrupted, and failing if the given timeout elapses.final booleanAbstractQueuedLongSynchronizer.tryAcquireSharedNanos(long arg, long nanosTimeout) Attempts to acquire in shared mode, aborting if interrupted, and failing if the given timeout elapses.final booleanAbstractQueuedSynchronizer.tryAcquireSharedNanos(int arg, long nanosTimeout) Attempts to acquire in shared mode, aborting if interrupted, and failing if the given timeout elapses.booleanAcquires the lock if it is free within the given waiting time and the current thread has not been interrupted.booleanAcquires the lock if it is not held by another thread within the given waiting time and the current thread has not been interrupted.booleanAcquires 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.booleanAcquires the write lock if it is not held by another thread within the given waiting time and the current thread has not been interrupted.longStampedLock.tryReadLock(long time, TimeUnit unit) Non-exclusively acquires the lock if it is available within the given time and the current thread has not been interrupted.longStampedLock.tryWriteLock(long time, TimeUnit unit) Exclusively acquires the lock if it is available within the given time and the current thread has not been interrupted.longStampedLock.writeLockInterruptibly()Exclusively acquires the lock, blocking if necessary until available or the current thread is interrupted. -
Uses of InterruptedException in javax.swing
Methods in javax.swing that throw InterruptedExceptionModifier and TypeMethodDescriptionfinal TSwingWorker.get()Waits if necessary for the computation to complete, and then retrieves its result.final TWaits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.static voidSwingUtilities.invokeAndWait(Runnable doRun) CausesdoRun.run()to be executed synchronously on the AWT event dispatching thread. -
Uses of InterruptedException in jdk.jfr.consumer
Methods in jdk.jfr.consumer that throw InterruptedExceptionModifier and TypeMethodDescriptionvoidEventStream.awaitTermination()Blocks until all actions are completed, or the stream is closed, or the current thread is interrupted, whichever happens first.voidEventStream.awaitTermination(Duration timeout) Blocks until all actions are completed, or the stream is closed, or the timeout occurs, or the current thread is interrupted, whichever happens first.voidRecordingStream.awaitTermination()voidRecordingStream.awaitTermination(Duration timeout) -
Uses of InterruptedException in jdk.management.jfr
Methods in jdk.management.jfr that throw InterruptedExceptionModifier and TypeMethodDescriptionvoidRemoteRecordingStream.awaitTermination()voidRemoteRecordingStream.awaitTermination(Duration timeout)