Prefer Executor over RunQueue...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6001 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
package com.threerings.presents.server;
|
package com.threerings.presents.server;
|
||||||
|
|
||||||
|
import java.util.concurrent.Executor;
|
||||||
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Singleton;
|
import com.google.inject.Singleton;
|
||||||
|
|
||||||
@@ -34,7 +36,7 @@ public class PresentsAuthInvoker extends ReportingInvoker
|
|||||||
{
|
{
|
||||||
@Inject public PresentsAuthInvoker (PresentsDObjectMgr omgr, ReportManager repmgr)
|
@Inject public PresentsAuthInvoker (PresentsDObjectMgr omgr, ReportManager repmgr)
|
||||||
{
|
{
|
||||||
super("presents.AuthInvoker", omgr, repmgr);
|
super("presents.AuthInvoker", (Executor)omgr, repmgr);
|
||||||
setDaemon(true);
|
setDaemon(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
package com.threerings.presents.server;
|
package com.threerings.presents.server;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.Executor;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
@@ -43,7 +44,7 @@ public class PresentsInvoker extends ReportingInvoker
|
|||||||
{
|
{
|
||||||
@Inject public PresentsInvoker (PresentsDObjectMgr omgr, Lifecycle cycle, ReportManager repmgr)
|
@Inject public PresentsInvoker (PresentsDObjectMgr omgr, Lifecycle cycle, ReportManager repmgr)
|
||||||
{
|
{
|
||||||
super("presents.Invoker", omgr, repmgr);
|
super("presents.Invoker", (Executor)omgr, repmgr);
|
||||||
cycle.addComponent(this);
|
cycle.addComponent(this);
|
||||||
_omgr = omgr;
|
_omgr = omgr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
package com.threerings.presents.server;
|
package com.threerings.presents.server;
|
||||||
|
|
||||||
|
import java.util.concurrent.Executor;
|
||||||
|
|
||||||
import com.samskivert.util.Invoker;
|
import com.samskivert.util.Invoker;
|
||||||
import com.samskivert.util.RunQueue;
|
import com.samskivert.util.RunQueue;
|
||||||
import com.samskivert.util.StringUtil;
|
import com.samskivert.util.StringUtil;
|
||||||
@@ -43,7 +45,16 @@ public class ReportingInvoker extends Invoker
|
|||||||
*/
|
*/
|
||||||
public ReportingInvoker (String name, RunQueue resultsQueue, ReportManager repmgr)
|
public ReportingInvoker (String name, RunQueue resultsQueue, ReportManager repmgr)
|
||||||
{
|
{
|
||||||
super(name, resultsQueue);
|
this(name, new RunQueue.AsExecutor(resultsQueue), repmgr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new reporting invoker. The instance will be registered with the report manager
|
||||||
|
* if profiling is enabled ({@link Invoker#PERF_TRACK}).
|
||||||
|
*/
|
||||||
|
public ReportingInvoker (String name, Executor receiver, ReportManager repmgr)
|
||||||
|
{
|
||||||
|
super(name, receiver);
|
||||||
if (PERF_TRACK) {
|
if (PERF_TRACK) {
|
||||||
repmgr.registerReporter(ReportManager.DEFAULT_TYPE, _defrep);
|
repmgr.registerReporter(ReportManager.DEFAULT_TYPE, _defrep);
|
||||||
repmgr.registerReporter(ReportManager.PROFILE_TYPE, _profrep);
|
repmgr.registerReporter(ReportManager.PROFILE_TYPE, _profrep);
|
||||||
|
|||||||
Reference in New Issue
Block a user