69 return get(java.lang.Thread.currentThread());
79 volatile Throwable interruptSource =
null;
80 volatile int interruptCounter = 0;
81 final Object sync =
new Object();
94 public Thread(
final ThreadGroup tg,
final Runnable target) {
103 public Thread(
final ThreadGroup tg,
final Runnable target,
final String name) {
104 super(tg, target, name);
115 public static Thread create(
final ThreadGroup tg,
final Runnable target,
final String name) {
116 return null != name ?
new Thread(tg, target, name) :
new Thread(tg, target);
122 final Throwable r = interruptSource;
132 final int r = interruptCounter;
142 interruptCounter = 0;
143 interruptSource =
null;
150 interruptSource =
new Throwable(getName()+
".interrupt() #"+interruptCounter);
java.lang.Thread specialization implementing InterruptSource to track java.lang.Thread#interrupt() ca...
final void clearInterruptSource()
Clears source and count of java.lang.Thread#interrupt() calls, if any.
final Throwable getInterruptSource(final boolean clear)
Returns the source of the last interrupt() call.
Thread()
See Thread#Thread( for details.
static Thread create(final ThreadGroup tg, final Runnable target, final String name)
Depending on whether name is null, either Thread(ThreadGroup, Runnable, String) or Thread(ThreadGroup...
Thread(final ThreadGroup tg, final Runnable target, final String name)
See Thread#Thread(ThreadGroup, Runnable, String) for details.
final int getInterruptCounter(final boolean clear)
Returns the count of java.lang.Thread#interrupt() calls.
Thread(final ThreadGroup tg, final Runnable target)
See Thread#Thread(ThreadGroup, Runnable) for details.
static InterruptSource currentThread()
Casts current java.lang.Thread to InterruptSource if applicable, otherwise returns null.
Interface exposing java.lang.Thread#interrupt() source, intended for java.lang.Thread specializations...
int getInterruptCounter(final boolean clear)
Returns the count of java.lang.Thread#interrupt() calls.
void clearInterruptSource()
Clears source and count of java.lang.Thread#interrupt() calls, if any.
Throwable getInterruptSource(final boolean clear)
Returns the source of the last interrupt() call.