# HG changeset patch # User sugi # Date 1400136203 -32400 # Node ID 11ba40caa93ba580707bd77a8467a7fb1b44a697 # Parent fdf17b55a66804bca3695d5e4347f232c9cf7fbc remove no need method diff -r fdf17b55a668 -r 11ba40caa93b src/main/java/alice/daemon/IncomingTcpConnection.java --- a/src/main/java/alice/daemon/IncomingTcpConnection.java Thu May 15 00:26:30 2014 +0900 +++ b/src/main/java/alice/daemon/IncomingTcpConnection.java Thu May 15 15:43:23 2014 +0900 @@ -10,7 +10,6 @@ import alice.datasegment.Command; import alice.datasegment.CommandType; import alice.datasegment.DataSegment; -import alice.datasegment.DataSegmentKey; import alice.datasegment.DataSegmentManager; import alice.datasegment.LocalDataSegmentManager; import alice.topology.HostMessage; @@ -44,19 +43,24 @@ CommandType type = CommandType.getCommandTypeFromId(msg.type); switch (type) { case UPDATE: - getDataSegmentKey(msg).runCommand(new Command(type, null, null, msg.val, 0, 0, null, null, reverseKey)); + lmanager.getDataSegmentKey(msg.key) + .runCommand(new Command(type, null, null, msg.val, 0, 0, null, null, reverseKey)); break; case PUT: - getDataSegmentKey(msg).runCommand(new Command(type, null, null, msg.val, 0, 0, null, null, reverseKey)); + lmanager.getDataSegmentKey(msg.key) + .runCommand(new Command(type, null, null, msg.val, 0, 0, null, null, reverseKey)); break; case PEEK: - getDataSegmentKey(msg).runCommand(new Command(type, null, null, null, msg.index, msg.seq, connection, null, null, msg.flag)); + lmanager.getDataSegmentKey(msg.key) + .runCommand(new Command(type, null, null, null, msg.index, msg.seq, connection, null, null, msg.flag)); break; case TAKE: - getDataSegmentKey(msg).runCommand(new Command(type, null, null, null, msg.index, msg.seq, connection, null, null, msg.flag)); + lmanager.getDataSegmentKey(msg.key) + .runCommand(new Command(type, null, null, null, msg.index, msg.seq, connection, null, null, msg.flag)); break; case REMOVE: - getDataSegmentKey(msg).runCommand(new Command(type, null, null, null, 0, 0, null, null, null)); + lmanager.getDataSegmentKey(msg.key) + .runCommand(new Command(type, null, null, null, 0, 0, null, null, null)); break; case REPLY: Command cmd = manager.getAndRemoveCmd(msg.seq); @@ -94,8 +98,4 @@ } return unpacker; } - - private DataSegmentKey getDataSegmentKey(CommandMessage msg) { - return lmanager.getDataSegmentKey(msg.key); - } }