Broke-out the notification that we've been posted to a shutdown RunQueue
into a method, so that it can be suppressed, etc. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2688 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -263,6 +263,15 @@ public abstract class Interval
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Note (log) that we were unable to be posted to our RunQueue because it is no longer running.
|
||||||
|
*/
|
||||||
|
protected void noteRejected ()
|
||||||
|
{
|
||||||
|
log.warning("Interval posted to shutdown RunQueue. Cancelling.",
|
||||||
|
"queue", _runQueue, "interval", this);
|
||||||
|
}
|
||||||
|
|
||||||
protected static Timer createTimer ()
|
protected static Timer createTimer ()
|
||||||
{
|
{
|
||||||
return new Timer("samskivert Interval Timer", true);
|
return new Timer("samskivert Interval Timer", true);
|
||||||
@@ -318,13 +327,12 @@ public abstract class Interval
|
|||||||
try {
|
try {
|
||||||
ival._runQueue.postRunnable(_runner);
|
ival._runQueue.postRunnable(_runner);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warning("Failed to execute interval on run-queue", "queue", ival._runQueue,
|
log.warning("Failed to execute interval on run-queue",
|
||||||
"interval", ival, e);
|
"queue", ival._runQueue, "interval", ival, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
log.warning("Interval posted to shutdown RunQueue. Cancelling.",
|
ival.noteRejected();
|
||||||
"queue", ival._runQueue, "interval", ival);
|
|
||||||
ival.cancel();
|
ival.cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user