Updated to use new Client-reference-free style.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6398 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -34,18 +34,18 @@ public interface PeerService extends InvocationService
|
||||
* Informs the node that the sending peer ratifies its acquisition or release of the specified
|
||||
* lock.
|
||||
*/
|
||||
void ratifyLockAction (Client client, Lock lock, boolean acquire);
|
||||
void ratifyLockAction (Lock lock, boolean acquire);
|
||||
|
||||
/**
|
||||
* Requests that the specified action be invoked on this server.
|
||||
*/
|
||||
void invokeAction (Client client, byte[] serializedAction);
|
||||
void invokeAction (byte[] serializedAction);
|
||||
|
||||
/**
|
||||
* Requests that the specified request be invoked on this server and wants a confirmation
|
||||
* when it's complete.
|
||||
*/
|
||||
void invokeRequest (Client client, byte[] serializedAction, ResultListener listener);
|
||||
void invokeRequest (byte[] serializedAction, ResultListener listener);
|
||||
|
||||
/**
|
||||
* Generates a server status report for this peer and returns it to the supplied listener. The
|
||||
@@ -53,5 +53,5 @@ public interface PeerService extends InvocationService
|
||||
*
|
||||
* @param type the type of report to generate. See ReportManager for more information.
|
||||
*/
|
||||
void generateReport (Client client, String type, ResultListener listener);
|
||||
void generateReport (String type, ResultListener listener);
|
||||
}
|
||||
|
||||
@@ -44,12 +44,12 @@ public class PeerMarshaller extends InvocationMarshaller
|
||||
public static final int GENERATE_REPORT = 1;
|
||||
|
||||
// from interface PeerService
|
||||
public void generateReport (Client arg1, String arg2, InvocationService.ResultListener arg3)
|
||||
public void generateReport (String arg1, InvocationService.ResultListener arg2)
|
||||
{
|
||||
InvocationMarshaller.ResultMarshaller listener3 = new InvocationMarshaller.ResultMarshaller();
|
||||
listener3.listener = arg3;
|
||||
sendRequest(arg1, GENERATE_REPORT, new Object[] {
|
||||
arg2, listener3
|
||||
InvocationMarshaller.ResultMarshaller listener2 = new InvocationMarshaller.ResultMarshaller();
|
||||
listener2.listener = arg2;
|
||||
sendRequest(GENERATE_REPORT, new Object[] {
|
||||
arg1, listener2
|
||||
});
|
||||
}
|
||||
|
||||
@@ -57,10 +57,10 @@ public class PeerMarshaller extends InvocationMarshaller
|
||||
public static final int INVOKE_ACTION = 2;
|
||||
|
||||
// from interface PeerService
|
||||
public void invokeAction (Client arg1, byte[] arg2)
|
||||
public void invokeAction (byte[] arg1)
|
||||
{
|
||||
sendRequest(arg1, INVOKE_ACTION, new Object[] {
|
||||
arg2
|
||||
sendRequest(INVOKE_ACTION, new Object[] {
|
||||
arg1
|
||||
});
|
||||
}
|
||||
|
||||
@@ -68,12 +68,12 @@ public class PeerMarshaller extends InvocationMarshaller
|
||||
public static final int INVOKE_REQUEST = 3;
|
||||
|
||||
// from interface PeerService
|
||||
public void invokeRequest (Client arg1, byte[] arg2, InvocationService.ResultListener arg3)
|
||||
public void invokeRequest (byte[] arg1, InvocationService.ResultListener arg2)
|
||||
{
|
||||
InvocationMarshaller.ResultMarshaller listener3 = new InvocationMarshaller.ResultMarshaller();
|
||||
listener3.listener = arg3;
|
||||
sendRequest(arg1, INVOKE_REQUEST, new Object[] {
|
||||
arg2, listener3
|
||||
InvocationMarshaller.ResultMarshaller listener2 = new InvocationMarshaller.ResultMarshaller();
|
||||
listener2.listener = arg2;
|
||||
sendRequest(INVOKE_REQUEST, new Object[] {
|
||||
arg1, listener2
|
||||
});
|
||||
}
|
||||
|
||||
@@ -81,10 +81,10 @@ public class PeerMarshaller extends InvocationMarshaller
|
||||
public static final int RATIFY_LOCK_ACTION = 4;
|
||||
|
||||
// from interface PeerService
|
||||
public void ratifyLockAction (Client arg1, NodeObject.Lock arg2, boolean arg3)
|
||||
public void ratifyLockAction (NodeObject.Lock arg1, boolean arg2)
|
||||
{
|
||||
sendRequest(arg1, RATIFY_LOCK_ACTION, new Object[] {
|
||||
arg2, Boolean.valueOf(arg3)
|
||||
sendRequest(RATIFY_LOCK_ACTION, new Object[] {
|
||||
arg1, Boolean.valueOf(arg2)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,7 +434,7 @@ public abstract class PeerManager
|
||||
// now send it to any remote node that is also appropriate
|
||||
for (PeerNode peer : _peers.values()) {
|
||||
if (peer.nodeobj != null && action.isApplicable(peer.nodeobj)) {
|
||||
peer.nodeobj.peerService.invokeAction(peer.getClient(), actionBytes);
|
||||
peer.nodeobj.peerService.invokeAction(actionBytes);
|
||||
invoked = true;
|
||||
}
|
||||
}
|
||||
@@ -457,7 +457,7 @@ public abstract class PeerManager
|
||||
{
|
||||
PeerNode peer = _peers.get(nodeName);
|
||||
if (peer != null) {
|
||||
peer.nodeobj.peerService.invokeAction(peer.getClient(), flattenAction(action));
|
||||
peer.nodeobj.peerService.invokeAction(flattenAction(action));
|
||||
} else if (nodeName.equals(_nodeName)) {
|
||||
invokeAction(null, flattenAction(action));
|
||||
}
|
||||
@@ -1299,7 +1299,7 @@ public abstract class PeerManager
|
||||
{
|
||||
PeerNode peer = _peers.get(nodeName);
|
||||
if (peer != null) {
|
||||
peer.nodeobj.peerService.invokeRequest(peer.getClient(), requestBytes, listener);
|
||||
peer.nodeobj.peerService.invokeRequest(requestBytes, listener);
|
||||
} else if (nodeName.equals(_nodeName)) {
|
||||
invokeRequest(null, requestBytes, listener);
|
||||
}
|
||||
@@ -1370,7 +1370,7 @@ public abstract class PeerManager
|
||||
_acquire = acquire;
|
||||
|
||||
// ratify the action
|
||||
peer.nodeobj.peerService.ratifyLockAction(peer.getClient(), lock, acquire);
|
||||
peer.nodeobj.peerService.ratifyLockAction(lock, acquire);
|
||||
|
||||
// listen for the act to take place
|
||||
peer.nodeobj.addListener(this);
|
||||
|
||||
Reference in New Issue
Block a user