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
This commit is contained in:
@@ -143,13 +143,8 @@ public abstract class PeerManager
|
||||
|
||||
/**
|
||||
* Encapsulates code that is meant to be executed one or more servers.
|
||||
*
|
||||
* <p><b>Note well</b>: 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.
|
||||
*
|
||||
* <p><b>Note well</b>: 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<String,PeerNode> _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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user