changeset 359:11ba40caa93b multicast

remove no need method
author sugi
date Thu, 15 May 2014 15:43:23 +0900
parents fdf17b55a668
children 6cf08aebfc31
files src/main/java/alice/daemon/IncomingTcpConnection.java
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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);
-	}
 }