public class InterrupterRegistry
extends java.lang.Object
Interrupter implementations for different threads.| Constructor and Description |
|---|
InterrupterRegistry() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearCurrentThreadInterrupter()
Clear the interrupter that was set for the currently executing
(calling) thread.
|
static Interrupter |
getCurrentThreadInterrupter()
Returns the interrupter for the currently executing (calling) thread.
|
static void |
setCurrentThreadInterrupter(Interrupter interrupter)
Set the interrupter for the currently executing (calling) thread.
|
static void |
throwIfInterruptRequestedForCurrentThread()
Throws an exception if the interrupter for the currently executing
(calling) thread determines that a task should be aborted.
|
public static void clearCurrentThreadInterrupter()
public static void setCurrentThreadInterrupter(Interrupter interrupter)
interrupter - interrupter that will be used for the current threadpublic static Interrupter getCurrentThreadInterrupter()
public static void throwIfInterruptRequestedForCurrentThread()
UncheckedInterruptedException - on interruption