From eda49af57b5c12629842a0dcc4addb7a11b7917d Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sun, 10 Aug 2008 02:16:54 +0000 Subject: [PATCH] Let's just use a runnable there. Having the node action turns out not to be super useful. If one really needs it they can keep a final reference around. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5304 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/presents/peer/server/PeerManager.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/presents/peer/server/PeerManager.java b/src/java/com/threerings/presents/peer/server/PeerManager.java index 41d921493..acacfd2f5 100644 --- a/src/java/com/threerings/presents/peer/server/PeerManager.java +++ b/src/java/com/threerings/presents/peer/server/PeerManager.java @@ -271,7 +271,7 @@ public abstract class PeerManager * the objects unless you really know what you're doing. more likely it will summarize * information contained therein. */ - public void applyToNodes (Function op) + public void applyToNodes (Function op) { op.apply(_nodeobj); for (PeerNode peer : _peers.values()) { @@ -312,10 +312,9 @@ public abstract class PeerManager * * @param onDropped a runnable to be executed if the action was not invoked on the local server * or any peer node due to failing to match any of the nodes. The runnable will be executed on - * the dobj event thread and will be passed the node action that was not invoked. + * the dobj event thread. */ - public void invokeNodeAction ( - final T action, final Function onDropped) + public void invokeNodeAction (final NodeAction action, final Runnable onDropped) { // if we're not on the dobjmgr thread, get there if (!_omgr.isDispatchThread()) { @@ -348,7 +347,7 @@ public abstract class PeerManager // if we did not invoke the action on any node, call the onDropped handler if (!invoked && onDropped != null) { - onDropped.apply(action); + onDropped.run(); } }