Mercurial > hg > Members > tatsuki > Alice
changeset 240:d9c9076d6b47
no use SEDA in IncomingTcpConnection
author | sugi |
---|---|
date | Tue, 09 Apr 2013 11:26:17 +0900 |
parents | 918bdc3ed11f |
children | 02783f3699b1 |
files | src/alice/daemon/IncomingTcpConnection.java |
diffstat | 1 files changed, 8 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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;