public class Interrupter
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
void |
avoidInterrupt(java.lang.Thread t,
java.lang.Object reason) |
static Interrupter |
get() |
java.util.Collection<Interrupt> |
getAllUnresolvedInterrupts() |
java.util.Collection<Interrupt> |
getAllUnresolvedInterruptsOfThread(java.lang.Thread thread) |
java.util.Optional<Interrupt> |
getInterruptOfCurrentThreadWithReason(java.lang.Object reason) |
java.util.Optional<Interrupt> |
getInterruptOfThreadWithReason(java.lang.Thread thread,
java.lang.Object reason) |
java.util.Optional<Interrupt> |
getLatestUnresolvedInterruptOfCurrentThread() |
java.util.Optional<Interrupt> |
getLatestUnresolvedInterruptOfThread(java.lang.Thread thread) |
boolean |
hasCurrentThreadBeenInterruptedWithReason(java.lang.Object reason) |
boolean |
hasCurrentThreadOpenInterrupts() |
boolean |
hasThreadBeenInterruptedWithReason(java.lang.Thread thread,
java.lang.Object reason) |
void |
interruptThread(java.lang.Thread t,
java.lang.Object reason) |
void |
markInterruptAsResolved(java.lang.Thread t,
java.lang.Object reason) |
void |
markInterruptOnCurrentThreadAsResolved(java.lang.Object reason) |
public static Interrupter get()
public void interruptThread(java.lang.Thread t,
java.lang.Object reason)
public boolean hasCurrentThreadBeenInterruptedWithReason(java.lang.Object reason)
public java.util.Optional<Interrupt> getInterruptOfCurrentThreadWithReason(java.lang.Object reason)
public java.util.Optional<Interrupt> getInterruptOfThreadWithReason(java.lang.Thread thread, java.lang.Object reason)
public void avoidInterrupt(java.lang.Thread t,
java.lang.Object reason)
public boolean hasThreadBeenInterruptedWithReason(java.lang.Thread thread,
java.lang.Object reason)
public java.util.Collection<Interrupt> getAllUnresolvedInterrupts()
public java.util.Collection<Interrupt> getAllUnresolvedInterruptsOfThread(java.lang.Thread thread)
public java.util.Optional<Interrupt> getLatestUnresolvedInterruptOfThread(java.lang.Thread thread)
public java.util.Optional<Interrupt> getLatestUnresolvedInterruptOfCurrentThread()
public boolean hasCurrentThreadOpenInterrupts()
public void markInterruptOnCurrentThreadAsResolved(java.lang.Object reason)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void markInterruptAsResolved(java.lang.Thread t,
java.lang.Object reason)