From 10bea22f14bf60207af8b10e536e5cfc2f24725b Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 29 Mar 2011 23:30:23 +0000 Subject: [PATCH] Made our node action and request into streamable closures, and removed the warning about having to extend them with static inner classes. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6551 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../presents/peer/server/PeerManager.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/threerings/presents/peer/server/PeerManager.java b/src/main/java/com/threerings/presents/peer/server/PeerManager.java index 770d2d96c..b23c010d5 100644 --- a/src/main/java/com/threerings/presents/peer/server/PeerManager.java +++ b/src/main/java/com/threerings/presents/peer/server/PeerManager.java @@ -143,13 +143,8 @@ public abstract class PeerManager /** * Encapsulates code that is meant to be executed one or more servers. - * - *

Note well: the action you provide is serialized and sent to the server to which - * the member is currently connection. This means you MUST NOT instantiate a NodeAction - * anonymously because that will maintain an implicit non-transient reference to its containing - * class which will then also be serialized (assuming it is even serializable). */ - public static abstract class NodeAction implements Streamable + public static abstract class NodeAction implements Streamable.Closure { /** Returns true if this action should be executed on the specified node. This will be * called on the originating server to decide whether or not to deliver the action to the @@ -170,13 +165,8 @@ public abstract class PeerManager /** * Encapsulates code that is meant to be executed one or more servers and return a result. - * - *

Note well: the request you provide is serialized and sent to the server to which - * the member is currently connection. This means you MUST NOT instantiate a NodeRequest - * anonymously because that will maintain an implicit non-transient reference to its containing - * class which will then also be serialized (assuming it is even serializable). */ - public static abstract class NodeRequest implements Streamable + public static abstract class NodeRequest implements Streamable.Closure { /** Returns true if this request should be executed on the specified node. This will be * called on the originating server to decide whether or not to deliver the request to the @@ -1600,8 +1590,6 @@ public abstract class PeerManager protected String _nodeNamespace; protected Map _peers = Maps.newHashMap(); - /** Used to resolve dependencies in unserialized {@link NodeAction} instances. */ - /** The client oids of all peers subscribed to the node object. */ protected ArrayIntSet _suboids = new ArrayIntSet();