comparison paper/source/IncomingTcpConnection.java @ 3:a97aa059242f

add images & sources
author Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
date Fri, 05 Feb 2016 21:00:41 +0900
parents
children
comparison
equal deleted inserted replaced
2:09b689ba5d70 3:a97aa059242f
1 while (true) {
2 Command cmd = null;
3 ReceiveData rData = null;
4 CommandMessage msg = unpacker.read(CommandMessage.class);
5 CommandType type = CommandType.getCommandTypeFromId(msg.type);
6 switch (type) {
7 case UPDATE:
8 case PUT:
9 int dataSize = unpacker.readInt();
10 rData = new ReceiveData(unpacker.getSerializedByteArray(dataSize), msg.compressed, msg.serialized);
11 cmd = new Command(type, null, null, rData, 0, 0, null, null, reverseKey);
12 lmanager.getDataSegmentKey(msg.key).runCommand(cmd);
13 break;