We can't inject the PresentsDObjectMgr because that causes a circular
dependency, but we can inject RunQueue which will Guice will magically defer to avoid the circularity. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5847 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -30,6 +30,8 @@ import com.samskivert.util.Interval;
|
|||||||
import com.samskivert.util.RunQueue;
|
import com.samskivert.util.RunQueue;
|
||||||
import com.samskivert.util.StringUtil;
|
import com.samskivert.util.StringUtil;
|
||||||
|
|
||||||
|
import com.threerings.presents.annotation.EventQueue;
|
||||||
|
|
||||||
import static com.threerings.presents.Log.log;
|
import static com.threerings.presents.Log.log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -68,7 +70,7 @@ public class ReportManager
|
|||||||
public void activatePeriodicReport ()
|
public void activatePeriodicReport ()
|
||||||
{
|
{
|
||||||
// queue up an interval which will generate reports
|
// queue up an interval which will generate reports
|
||||||
_reportInterval = new Interval(_omgr) {
|
_reportInterval = new Interval(_dobjq) {
|
||||||
@Override
|
@Override
|
||||||
public void expired () {
|
public void expired () {
|
||||||
logReport(LOG_REPORT_HEADER +
|
logReport(LOG_REPORT_HEADER +
|
||||||
@@ -188,8 +190,8 @@ public class ReportManager
|
|||||||
/** Used to generate "state of server" reports. */
|
/** Used to generate "state of server" reports. */
|
||||||
protected Multimap<String, Reporter> _reporters = ArrayListMultimap.create();
|
protected Multimap<String, Reporter> _reporters = ArrayListMultimap.create();
|
||||||
|
|
||||||
// dependencies
|
/** We need to queue up our reporting interval on this feller. */
|
||||||
@Inject protected PresentsDObjectMgr _omgr;
|
@Inject protected @EventQueue RunQueue _dobjq;
|
||||||
|
|
||||||
/** The frequency with which we generate "state of server" reports. */
|
/** The frequency with which we generate "state of server" reports. */
|
||||||
protected static final long REPORT_INTERVAL = 15 * 60 * 1000L;
|
protected static final long REPORT_INTERVAL = 15 * 60 * 1000L;
|
||||||
|
|||||||
Reference in New Issue
Block a user