Changed the name of the interface implemented by the Runnable we post
to a RunQueue to run the expired() method: calling it Runnable resulted in annoyance when one desired to create an anonymous java.lang.Runnable inside one's own Interval. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1737 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -36,8 +36,13 @@ public abstract class Interval
|
|||||||
* An interface that will be implemented by the runnable posted
|
* An interface that will be implemented by the runnable posted
|
||||||
* to a RunQueue that can be used to retrieve the original Interval.
|
* to a RunQueue that can be used to retrieve the original Interval.
|
||||||
*/
|
*/
|
||||||
public static interface Runnable extends java.lang.Runnable
|
public static interface RunBuddy extends Runnable
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Retrieve the Interval that is responsible for posting this
|
||||||
|
* RunBuddy to a RunQueue. Most likely used to call toString()
|
||||||
|
* on the Interval for logging purposes.
|
||||||
|
*/
|
||||||
public Interval getInterval ();
|
public Interval getInterval ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,7 +164,7 @@ public abstract class Interval
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (_runner == null) { // lazy initialize _runner
|
if (_runner == null) { // lazy initialize _runner
|
||||||
_runner = new Runnable() {
|
_runner = new RunBuddy() {
|
||||||
public void run () {
|
public void run () {
|
||||||
safelyExpire(IntervalTask.this);
|
safelyExpire(IntervalTask.this);
|
||||||
}
|
}
|
||||||
@@ -178,7 +183,7 @@ public abstract class Interval
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** If we are using a RunQueue, the Runnable we post to it. */
|
/** If we are using a RunQueue, the Runnable we post to it. */
|
||||||
protected Runnable _runner;
|
protected RunBuddy _runner;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** If non-null, the RunQueue used to run the expired() method for each
|
/** If non-null, the RunQueue used to run the expired() method for each
|
||||||
|
|||||||
Reference in New Issue
Block a user