Add an IntervalFactory interface, which just declares newInterval(), and have RootDObjectManager extend it.

Leaving RootDObjectManager's declaration of newInterval() alone, because it contains docs that are specific to its implementation.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6474 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Tom Conkling
2011-02-02 01:27:38 +00:00
parent 084f5ba944
commit 04df68ea68
2 changed files with 17 additions and 1 deletions
@@ -0,0 +1,16 @@
package com.threerings.presents.dobj;
import com.samskivert.util.Interval;
public interface IntervalFactory
{
/**
* Creates an {@link Interval} that runs the supplied runnable.
*
* <pre>
* _factory.newInterval(someRunnable).schedule(500); // one shot
* Interval ival = _factory.newInterval(someRunnable).schedule(500, true); // repeater
* </pre>
*/
Interval newInterval (Runnable action);
}
@@ -32,7 +32,7 @@ import com.samskivert.util.RunQueue;
* distributed objects in question. VMs that operate proxies of objects can only implement the * distributed objects in question. VMs that operate proxies of objects can only implement the
* basic distributed object manager interface. * basic distributed object manager interface.
*/ */
public interface RootDObjectManager extends DObjectManager, RunQueue, Executor public interface RootDObjectManager extends DObjectManager, RunQueue, Executor, IntervalFactory
{ {
/** /**
* Looks up and returns the requested distributed object in the dobj table, returning null if * Looks up and returns the requested distributed object in the dobj table, returning null if