# HG changeset patch # User sugi # Date 1365474377 -32400 # Node ID d9c9076d6b47b2554c50ecd5c2ec2cac85b3b1c7 # Parent 918bdc3ed11f9d6b3f3ce0b956b4cca66e3d19b7 no use SEDA in IncomingTcpConnection diff -r 918bdc3ed11f -r d9c9076d6b47 src/alice/daemon/IncomingTcpConnection.java --- a/src/alice/daemon/IncomingTcpConnection.java Mon Apr 08 17:45:49 2013 +0900 +++ b/src/alice/daemon/IncomingTcpConnection.java Tue Apr 09 11:26:17 2013 +0900 @@ -43,27 +43,24 @@ CommandType type = CommandType.getCommandTypeFromId(msg.type); switch (type) { case UPDATE: - lmanager.submitCommand(getDataSegmentKey(msg), - new Command(type, null, null, msg.val, 0, 0, null, null, reverseKey)); + getDataSegmentKey(msg).runCommand(new Command(type, null, null, msg.val, 0, 0, null, null, reverseKey)); break; case PUT: - lmanager.submitCommand(getDataSegmentKey(msg), - new Command(type, null, null, msg.val, 0, 0, null, null, reverseKey)); + getDataSegmentKey(msg).runCommand(new Command(type, null, null, msg.val, 0, 0, null, null, reverseKey)); break; case PEEK: - lmanager.submitCommand(getDataSegmentKey(msg), - new Command(type, null, null, null, msg.index, msg.seq, connection.sendQueue, null, null)); + getDataSegmentKey(msg).runCommand(new Command(type, null, null, null, msg.index, msg.seq, connection.sendQueue, null, null)); break; case TAKE: - lmanager.submitCommand(getDataSegmentKey(msg), - new Command(type, null, null, null, msg.index, msg.seq, connection.sendQueue, null, null)); + getDataSegmentKey(msg).runCommand(new Command(type, null, null, null, msg.index, msg.seq, connection.sendQueue, null, null)); break; case REMOVE: - lmanager.submitCommand(getDataSegmentKey(msg), - new Command(type, null, null, null, 0, 0, null, null, null)); + getDataSegmentKey(msg).runCommand(new Command(type, null, null, null, 0, 0, null, null, null)); break; case REPLY: - manager.addReplyCommand(new Command(type, null, null, msg.val, msg.index, msg.seq, null, null, null)); + Command cmd = manager.getAndRemoveCmd(msg.seq); + cmd.cs.ids.reply(cmd.receiver, new Command(type, null, null, msg.val, msg.index, msg.seq, null, null, null)); + cmd=null; break; default: break;