A daemon thread. Also see StoppableThread for an alternative daemon
private volatile boolean paused = false;
this.name = name + " (" + nodeName + ")";
If run is true, starts the thread if not started or unpauses it
if already started; if run is false, pauses the thread if
started or does nothing if not started.
Requests shutdown and calls join() to wait for the thread to stop.
while (numTries <= maxRetries &&
("Shutting down " + this + " due to exception: " + e);
this.toString() + " caught exception, " + e +
If Daemon Thread throws errors and exceptions, this function will catch
it and throw a EnvironmentFailureException, and fail the test.
Only used during testing.
"Daemon thread failed during testing", e);
Returns the number of retries to perform when Deadlock Exceptions
onWakeup is synchronized to ensure that multiple invocations of the
DaemonThread aren't made.
Returns whether shutdown has been requested. This method should be
used to to terminate daemon loops.
Returns whether the daemon is currently paused/disabled. This method
should be used to to terminate daemon loops.
Returns whether the onWakeup method is currently executing. This is
only an approximation and is used to avoid unnecessary wakeups.