クラスjava.lang.InterruptedException
の使用
-
InterruptedExceptionを使用しているパッケージ パッケージ 説明 com.sun.jdi.event このパッケージは、JDIイベントとイベント処理を定義します。java.awt ユーザー・インタフェースの作成およびグラフィックスとイメージのペイント用のすべてのクラスを含みます。java.awt.image イメージを作成および修正するためのクラスを提供します。java.lang Javaプログラミング言語の設計にあたり基本的なクラスを提供します。java.lang.ref 参照オブジェクト・クラスを提供し、限定されたレベルでのガベージ・コレクタとの対話を可能にします。java.nio.channels 入出力操作を実行できるエンティティ(ファイル、ソケットなど)への接続を表すチャネルや、多重化された非ブロック入出力操作用のセレクタを定義します。java.nio.file ファイル、ファイル属性、およびファイル・システムにアクセスするためのJava仮想マシン用のインタフェースとクラスを定義します。java.util.concurrent 並行プログラミングでよく使用されるユーティリティ・クラスです。java.util.concurrent.locks 組込みの同期および監視から区別された状態をロックおよび待機するためのフレームワークを提供するインタフェースおよびクラス。javax.swing すべてのプラットフォーム上で可能なかぎり同じように機能する「軽量」(Java共通言語)コンポーネントのセットを提供します。jdk.incubator.http 高レベルのHTTPとWebSocket API -
-
com.sun.jdi.eventでのInterruptedExceptionの使用
InterruptedExceptionをスローするcom.sun.jdi.eventのメソッド 修飾子と型 メソッド 説明 EventSet
EventQueue. remove()
次に利用可能なイベントを無期限に待機します。EventSet
EventQueue. remove(long timeout)
次に利用可能なイベントを指定された時間待機します。 -
java.awtでのInterruptedExceptionの使用
InterruptedExceptionをスローするjava.awtのメソッド 修飾子と型 メソッド 説明 AWTEvent
EventQueue. getNextEvent()
EventQueue
からイベントを削除し、そのイベントを返します。static void
EventQueue. invokeAndWait(Runnable runnable)
runnable
のrun
メソッドがthe system EventQueue
のdispatch thread
で呼び出されるようにします。void
MediaTracker. waitForAll()
このメディア・トラッカによって監視されるすべてのイメージのロードを開始します。boolean
MediaTracker. waitForAll(long ms)
このメディア・トラッカによって監視されるすべてのイメージのロードを開始します。void
MediaTracker. waitForID(int id)
このメディア・トラッカによって監視される、指定された識別子を持つすべてのイメージのロードを開始します。boolean
MediaTracker. waitForID(int id, long ms)
このメディア・トラッカによって監視される、指定された識別子を持つすべてのイメージのロードを開始します。 -
java.awt.imageでのInterruptedExceptionの使用
InterruptedExceptionをスローするjava.awt.imageのメソッド 修飾子と型 メソッド 説明 boolean
PixelGrabber. grabPixels()
ImageまたはImageProducerに、ピクセルの転送を開始し、転送を要求された矩形のピクセルがすべて転送されるまで待つことを要求します。boolean
PixelGrabber. grabPixels(long ms)
ピクセルの転送を開始するようImageまたはImageProducerに要求し、目的の矩形のピクセルがすべて転送されるまで、または指定された時間が経過するまで待ちます。 -
java.langでのInterruptedExceptionの使用
InterruptedExceptionをスローするjava.langのメソッド 修飾子と型 メソッド 説明 void
Thread. join()
このスレッドが終了するのを待機します。void
Thread. join(long millis)
このスレッドが終了するのを、最高でmillis
ミリ秒待機します。void
Thread. join(long millis, int nanos)
最高でmillis
ミリ秒にnanos
ナノ秒を加算した間、このスレッドが終了するのを待機します。static void
Thread. sleep(long millis)
システム・タイマーとスケジューラが正確であることを前提として、現在実行中のスレッドを、指定されたミリ秒数の間、スリープ(一時的に実行を停止)させます。static void
Thread. sleep(long millis, int nanos)
システム・タイマーとスケジューラが正確であることを前提として、現在実行中のスレッドを、指定されたミリ秒数に指定されたナノ秒数を加算した間、スリープ(一時的に実行を停止)させます。void
Object. wait()
現在のスレッドを起動するまで待ちます。通常、notifiedまたはinterruptedです。void
Object. wait(long timeout)
現在のスレッドは、通常、notifiedまたはinterruptedによって、または一定量のリアルタイムが経過するまで、起動するまで待機します。void
Object. wait(long timeout, int nanos)
現在のスレッドは、通常、notifiedまたはinterruptedによって、または一定量のリアルタイムが経過するまで、起動するまで待機します。abstract int
Process. waitFor()
必要な場合に、このProcess
オブジェクトが表すプロセスが終了するまで現在のスレッドを待機させます。boolean
Process. waitFor(long timeout, TimeUnit unit)
このProcess
オブジェクトが表すプロセスが終了するか、指定された待機時間が経過するまで、必要に応じて現在のスレッドを待機させます。 -
java.lang.refでのInterruptedExceptionの使用
InterruptedExceptionをスローするjava.lang.refのメソッド 修飾子と型 メソッド 説明 Reference<? extends T>
ReferenceQueue. remove()
このキューの次の参照オブジェクトを削除します。参照オブジェクトが利用可能になるまでブロックされます。Reference<? extends T>
ReferenceQueue. remove(long timeout)
このキューの次の参照オブジェクトを削除します。参照オブジェクトが利用可能になるか、指定されたタイム・アウトの期限が切れるまでブロックします。 -
java.nio.channelsでのInterruptedExceptionの使用
InterruptedExceptionをスローするjava.nio.channelsのメソッド 修飾子と型 メソッド 説明 abstract boolean
AsynchronousChannelGroup. awaitTermination(long timeout, TimeUnit unit)
グループの終了を待機します。 -
java.nio.fileでのInterruptedExceptionの使用
InterruptedExceptionをスローするjava.nio.fileのメソッド 修飾子と型 メソッド 説明 WatchKey
WatchService. poll(long timeout, TimeUnit unit)
次の監視鍵を取得して削除します。何も存在しない場合は、必要に応じて指定された待機時間まで待機します。WatchKey
WatchService. take()
次の監視鍵を取得して削除します。何も存在しない場合は待機します。 -
java.util.concurrentでのInterruptedExceptionの使用
InterruptedExceptionをスローするjava.util.concurrentのメソッド 修飾子と型 メソッド 説明 void
Semaphore. acquire()
このセマフォからパーミットを取得します。パーミットが利用可能になるか、またはスレッドが割り込みされるまでブロックします。void
Semaphore. acquire(int permits)
このセマフォから指定された数のパーミットを取得します。すべてのパーミットが利用可能になるか、またはスレッドが割り込みされるまでブロックします。void
CountDownLatch. await()
スレッドで割り込みが発生しないかぎり、ラッチのカウント・ダウンがゼロになるまで現在のスレッドを待機させます。boolean
CountDownLatch. await(long timeout, TimeUnit unit)
スレッドで割り込みが発生するか、指定された待機時間が経過しないかぎり、ラッチのカウント・ダウンがゼロになるまで現在のスレッドを待機させます。int
CyclicBarrier. await()
すべてのパーティがこのバリアーでawait
を呼び出すまで待機します。int
CyclicBarrier. await(long timeout, TimeUnit unit)
すべてのパーティがこのバリアーでawait
を呼び出すか、指定された待機時間が経過するまで待機します。int
Phaser. awaitAdvanceInterruptibly(int phase)
このフェーザのフェーズが指定されたフェーズ値から進むまで待機し、待機中に割込みが発生した場合はInterruptedException
をスローし、現在のフェーズが指定されたフェーズ値と等しくないか、このフェーザが終了した場合はすぐに復帰します。int
Phaser. awaitAdvanceInterruptibly(int phase, long timeout, TimeUnit unit)
このフェーザのフェーズが指定されたフェーズ値から進むか、指定されたタイム・アウト時間が経過するまで待機し、待機中に割込みが発生した場合はInterruptedException
をスローし、現在のフェーズが指定されたフェーズ値と等しくないか、このフェーザが終了した場合はすぐに復帰します。boolean
ExecutorService. awaitTermination(long timeout, TimeUnit unit)
シャットダウン要求後にすべてのタスクが実行を完了していたか、タイム・アウトが発生するか、現在のスレッドで割込みが発生するか、そのいずれかが最初に発生するまでブロックします。boolean
ForkJoinPool. awaitTermination(long timeout, TimeUnit unit)
シャットダウン要求後にすべてのタスクが実行を完了していたか、タイム・アウトが発生するか、現在のスレッドで割込みが発生するか、そのいずれかが最初に発生するまでブロックします。boolean
ForkJoinPool.ManagedBlocker. block()
ロックまたは条件を待機しているスレッドなどの現在のスレッドを、可能な場合にブロックします。V
Exchanger. exchange(V x)
現在のスレッドは、割り込みが発生しないかぎり、もう一方のスレッドがこの交換ポイントに達するまで待機し、指定されたオブジェクトをそのスレッドに転送して、代わりにもう一方のスレッドのオブジェクトを受け取ります。V
Exchanger. exchange(V x, long timeout, TimeUnit unit)
現在のスレッドは、割り込みが発生するか、指定された待機時間が経過しないかぎり、もう一方のスレッドがこの交換ポイントに達するまで待機し、指定されたオブジェクトをそのスレッドに転送して、代わりにもう一方のスレッドのオブジェクトを受け取ります。T
CompletableFuture. get()
必要な場合はこのフューチャが完了するのを待機し、その結果を返します。T
CompletableFuture. get(long timeout, TimeUnit unit)
必要な場合は指定された時間までこのフューチャが完了するのを待機し、その結果を返します(使用可能な場合)。V
ForkJoinTask. get()
必要に応じて計算が完了するまで待機し、その後、計算結果を取得します。V
ForkJoinTask. get(long timeout, TimeUnit unit)
必要に応じて、最大で指定された時間、計算が完了するまで待機し、その後、計算結果が利用可能な場合は結果を取得します。V
Future. get()
必要に応じて計算が完了するまで待機し、その後、計算結果を取得します。V
Future. get(long timeout, TimeUnit unit)
必要に応じて、最大で指定された時間、計算が完了するまで待機し、その後、計算結果が利用可能な場合は結果を取得します。V
FutureTask. get()
V
FutureTask. get(long timeout, TimeUnit unit)
<T> List<Future<T>>
ExecutorService. invokeAll(Collection<? extends Callable<T>> tasks)
指定されたタスクを実行し、すべて完了すると、ステータスと結果を含むFutureのリストを返します。<T> List<Future<T>>
ExecutorService. invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
指定されたタスクを実行し、すべてが完了するか時間切れになるか、そのいずれかが最初に発生した時点で、ステータスと結果を含むFutureのリストを返します。<T> T
ExecutorService. invokeAny(Collection<? extends Callable<T>> tasks)
指定されたタスクを実行し、例外をスローせずに正常に完了したタスクが存在する場合は、その結果を返します。<T> T
ExecutorService. invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
指定されたタスクを実行し、タイム・アウトが経過する前に例外をスローせずに正常に完了したタスクが存在する場合は、その結果を返します。static void
ForkJoinPool. managedBlock(ForkJoinPool.ManagedBlocker blocker)
指定された潜在的ブロック・タスクを実行します。boolean
ArrayBlockingQueue. offer(E e, long timeout, TimeUnit unit)
指定された要素をこのキューの末尾に挿入します。このキューがいっぱいである場合は、指定された時間まで空きが生じるのを待機します。boolean
BlockingDeque. offer(E e, long timeout, TimeUnit unit)
指定された要素をこの両端キューで表されるキュー(つまり、この両端キューの末尾)に挿入します。必要に応じて、指定された待機時間まで空きが生じるのを待機します。boolean
BlockingQueue. offer(E e, long timeout, TimeUnit unit)
指定された要素をこのキューに挿入します。必要に応じて、指定された時間まで空きが生じるのを待機します。boolean
LinkedBlockingDeque. offer(E e, long timeout, TimeUnit unit)
boolean
LinkedBlockingQueue. offer(E e, long timeout, TimeUnit unit)
指定された要素をこのキューの末尾に挿入します。必要に応じて、指定された待機時間まで空きが生じるのを待機します。boolean
SynchronousQueue. offer(E e, long timeout, TimeUnit unit)
指定された要素をこのキューに挿入します。必要に応じて、指定された待機時間まで別のスレッドが要素を受け取るのを待機します。boolean
BlockingDeque. offerFirst(E e, long timeout, TimeUnit unit)
指定された要素をこの両端キューの先頭に挿入します。必要に応じて、指定された待機時間まで空きが生じるのを待機します。boolean
LinkedBlockingDeque. offerFirst(E e, long timeout, TimeUnit unit)
boolean
BlockingDeque. offerLast(E e, long timeout, TimeUnit unit)
指定された要素をこの両端キューの末尾に挿入します。必要に応じて、指定された待機時間まで空きが生じるのを待機します。boolean
LinkedBlockingDeque. offerLast(E e, long timeout, TimeUnit unit)
E
BlockingDeque. poll(long timeout, TimeUnit unit)
この両端キューによって表されるキューの先頭(つまり、この両端キューの最初の要素)を取得して削除します。必要に応じて、指定された待機時間まで要素が利用可能になるのを待機します。E
BlockingQueue. poll(long timeout, TimeUnit unit)
このキューの先頭を取得して削除します。必要に応じて、指定された待機時間まで要素が利用可能になるのを待機します。Future<V>
CompletionService. poll(long timeout, TimeUnit unit)
次の完了済みタスクを表すFutureを取得して削除します。何も存在しない場合は、必要に応じて指定された待機時間まで待機します。E
DelayQueue. poll(long timeout, TimeUnit unit)
このキューの先頭を取得および削除します。必要に応じて、期限切れの遅延がある要素がこのキューで利用可能になるまで、または指定された有効期限が切れるまで待機します。E
SynchronousQueue. poll(long timeout, TimeUnit unit)
このキューの先頭を取得および削除します。必要に応じて、指定された待機時間まで別のスレッドがその要素を挿入するのを待機します。E
BlockingDeque. pollFirst(long timeout, TimeUnit unit)
この両端キューの最初の要素を取得して削除します。必要に応じて、指定された待機時間まで要素が利用可能になるのを待機します。E
BlockingDeque. pollLast(long timeout, TimeUnit unit)
この両端キューの最後の要素を取得して削除します。必要に応じて、指定された待機時間まで要素が利用可能になるのを待機します。void
ArrayBlockingQueue. put(E e)
指定された要素をこのキューの末尾に挿入します。このキューがいっぱいの場合は、空きが生じるまで待機します。void
BlockingDeque. put(E e)
指定された要素をこの両端キューで表されるキュー(つまり、この両端キューの末尾)に挿入します。必要に応じて、空きが生じるまで待機します。void
BlockingQueue. put(E e)
指定された要素をこのキューに挿入します。必要に応じて、空きが生じるまで待機します。void
LinkedBlockingDeque. put(E e)
void
LinkedBlockingQueue. put(E e)
指定された要素をこのキューの末尾に挿入します。必要に応じて、空きが生じるまで待機します。void
SynchronousQueue. put(E e)
指定された要素をこのキューに追加します。必要に応じて、別のスレッドが要素を受け取るまで待機します。void
BlockingDeque. putFirst(E e)
指定された要素をこの両端キューの先頭に挿入します。必要に応じて、空きが生じるまで待機します。void
LinkedBlockingDeque. putFirst(E e)
void
BlockingDeque. putLast(E e)
指定された要素をこの両端キューの末尾に挿入します。必要に応じて、空きが生じるまで待機します。void
LinkedBlockingDeque. putLast(E e)
void
TimeUnit. sleep(long timeout)
この時間単位を使用して、Thread.sleep
を実行します。E
BlockingDeque. take()
この両端キューによって表されるキューの先頭(つまり、この両端キューの最初の要素)を取得して削除します。必要に応じて、要素が利用可能になるまで待機します。E
BlockingQueue. take()
このキューの先頭を取得して削除します。必要に応じて、要素が利用可能になるまで待機します。Future<V>
CompletionService. take()
次の完了済みタスクを表すFutureを取得して削除します。何も存在しない場合は待機します。E
DelayQueue. take()
このキューの先頭を取得および削除します。必要に応じて、期限切れの遅延がある要素がこのキューで利用可能になるまで待機します。E
SynchronousQueue. take()
このキューの先頭を取得して削除します。必要に応じて、別のスレッドがその要素を挿入するまで待機します。E
BlockingDeque. takeFirst()
この両端キューの最初の要素を取得して削除します。必要に応じて、要素が利用可能になるまで待機します。E
BlockingDeque. takeLast()
この両端キューの最後の要素を取得して削除します。必要に応じて、要素が利用可能になるまで待機します。void
TimeUnit. timedJoin(Thread thread, long timeout)
この時間単位を使用して、時間指定されたThread.join
を実行します。void
TimeUnit. timedWait(Object obj, long timeout)
この時間単位を使用して、時間指定されたObject.wait
を実行します。void
LinkedTransferQueue. transfer(E e)
待機する必要があれば待機し、要素をコンシューマに転送します。void
TransferQueue. transfer(E e)
待機する必要があれば待機し、要素をコンシューマに転送します。boolean
Semaphore. tryAcquire(int permits, long timeout, TimeUnit unit)
指定された待機時間内で指定された数のパーミットが利用可能であり、現在のスレッドで割り込みが発生していない場合に、このセマフォから指定された数のパーミットを取得します。boolean
Semaphore. tryAcquire(long timeout, TimeUnit unit)
指定された待機時間内でパーミットが利用可能になり、現在のスレッドで割り込みが発生していない場合に、このセマフォからパーミットを取得します。boolean
LinkedTransferQueue. tryTransfer(E e, long timeout, TimeUnit unit)
タイム・アウトが経過する前に要素をコンシューマに転送できる場合には、そうします。boolean
TransferQueue. tryTransfer(E e, long timeout, TimeUnit unit)
タイム・アウトが経過する前に要素をコンシューマに転送できる場合には、そうします。 -
java.util.concurrent.locksでのInterruptedExceptionの使用
InterruptedExceptionをスローするjava.util.concurrent.locksのメソッド 修飾子と型 メソッド 説明 void
AbstractQueuedLongSynchronizer. acquireInterruptibly(long arg)
排他モードで取得します。割込みが発生した場合は、中止します。void
AbstractQueuedSynchronizer. acquireInterruptibly(int arg)
排他モードで取得します。割込みが発生した場合は、中止します。void
AbstractQueuedLongSynchronizer. acquireSharedInterruptibly(long arg)
共有モードで取得します。void
AbstractQueuedSynchronizer. acquireSharedInterruptibly(int arg)
共有モードで取得します。void
AbstractQueuedLongSynchronizer.ConditionObject. await()
割込み可能な状態待機を実装します。boolean
AbstractQueuedLongSynchronizer.ConditionObject. await(long time, TimeUnit unit)
時間の指定された状態待機を実装します。void
AbstractQueuedSynchronizer.ConditionObject. await()
割込み可能な状態待機を実装します。boolean
AbstractQueuedSynchronizer.ConditionObject. await(long time, TimeUnit unit)
時間の指定された状態待機を実装します。void
Condition. await()
信号が送信されるか、割込みが発生するまで、現在のスレッドを待機させます。boolean
Condition. await(long time, TimeUnit unit)
信号が送信される、割込みが発生する、または指定された待機時間が経過するまで、現在のスレッドを待機させます。long
AbstractQueuedLongSynchronizer.ConditionObject. awaitNanos(long nanosTimeout)
時間の指定された状態待機を実装します。long
AbstractQueuedSynchronizer.ConditionObject. awaitNanos(long nanosTimeout)
時間の指定された状態待機を実装します。long
Condition. awaitNanos(long nanosTimeout)
信号が送信される、割込みが発生する、または指定された待機時間が経過するまで、現在のスレッドを待機させます。boolean
AbstractQueuedLongSynchronizer.ConditionObject. awaitUntil(Date deadline)
絶対時間の指定された状態待機を実装します。boolean
AbstractQueuedSynchronizer.ConditionObject. awaitUntil(Date deadline)
絶対時間の指定された状態待機を実装します。boolean
Condition. awaitUntil(Date deadline)
信号が送信される、割込みが発生する、または指定された期限が経過するまで、現在のスレッドを待機させます。void
Lock. lockInterruptibly()
現在のスレッドに対して割り込みが発生していないかぎり、ロックを取得します。void
ReentrantLock. lockInterruptibly()
現在のスレッドに対して割り込みが発生していないかぎり、ロックを取得します。void
ReentrantReadWriteLock.ReadLock. lockInterruptibly()
現在のスレッドに割り込みが発生しないかぎり、読込みロックを取得します。void
ReentrantReadWriteLock.WriteLock. lockInterruptibly()
現在のスレッドに割り込みが発生しないかぎり、書込みロックを取得します。long
StampedLock. readLockInterruptibly()
ロックを非排他的に取得し、利用可能になるまで、または現在のスレッドが割り込まれるまで、必要に応じてブロックします。boolean
AbstractQueuedLongSynchronizer. tryAcquireNanos(long arg, long nanosTimeout)
排他モードで取得を試みます。割込みが発生した場合は中止し、指定されたタイム・アウト時間が経過した場合は失敗します。boolean
AbstractQueuedSynchronizer. tryAcquireNanos(int arg, long nanosTimeout)
排他モードで取得を試みます。割込みが発生した場合は中止し、指定されたタイム・アウト時間が経過した場合は失敗します。boolean
AbstractQueuedLongSynchronizer. tryAcquireSharedNanos(long arg, long nanosTimeout)
共有モードで取得を試みます。割込みが発生した場合は中止し、指定されたタイム・アウト時間が経過した場合は失敗します。boolean
AbstractQueuedSynchronizer. tryAcquireSharedNanos(int arg, long nanosTimeout)
共有モードで取得を試みます。割込みが発生した場合は中止し、指定されたタイム・アウト時間が経過した場合は失敗します。boolean
Lock. tryLock(long time, TimeUnit unit)
指定された待機時間内でロックが利用可能であり、現在のスレッドで割り込みが発生していない場合に、ロックを取得します。boolean
ReentrantLock. tryLock(long timeout, TimeUnit unit)
指定された待機時間内に別のスレッドがロックを保持せず、現在のスレッドで割り込みが発生していない場合に、ロックを取得します。boolean
ReentrantReadWriteLock.ReadLock. tryLock(long timeout, TimeUnit unit)
指定された待機時間内に別のスレッドが書込みロックを保持せず、現在のスレッドで割り込みが発生していない場合に、読込みロックを取得します。boolean
ReentrantReadWriteLock.WriteLock. tryLock(long timeout, TimeUnit unit)
指定された待機時間内に別のスレッドがロックを保持せず、現在のスレッドで割り込みが発生していない場合に、書込みロックを取得します。long
StampedLock. tryReadLock(long time, TimeUnit unit)
指定された時間内でロックが利用可能になり、現在のスレッドで割込みが発生していない場合に、それを非排他的に取得します。long
StampedLock. tryWriteLock(long time, TimeUnit unit)
指定された時間内でロックが利用可能になり、現在のスレッドで割込みが発生していない場合に、それを排他的に取得します。long
StampedLock. writeLockInterruptibly()
ロックを排他的に取得し、必要に応じて利用可能になるか、現在のスレッドで割込みが発生するまでブロックします。 -
javax.swingでのInterruptedExceptionの使用
InterruptedExceptionをスローするjavax.swingのメソッド 修飾子と型 メソッド 説明 T
SwingWorker. get()
必要に応じて計算が完了するまで待機し、その後、計算結果を取得します。T
SwingWorker. get(long timeout, TimeUnit unit)
必要に応じて、最大で指定された時間、計算が完了するまで待機し、その後、計算結果が利用可能な場合は結果を取得します。static void
SwingUtilities. invokeAndWait(Runnable doRun)
doRun.run()
を、AWTイベント・ディスパッチ・スレッドで非同期的に実行させます。 -
jdk.incubator.httpでのInterruptedExceptionの使用
InterruptedExceptionをスローするjdk.incubator.httpのメソッド 修飾子と型 メソッド 説明 abstract <T> HttpResponse<T>
HttpClient. send(HttpRequest req, HttpResponse.BodyHandler<T> responseBodyHandler)
このクライアントを使用してリクエストを送信し、必要に応じてブロックしてレスポンスを取得します。
-