comparison paper/source/IncomingTcpConnection.java @ 1:84254e949b77

before Seminar
author Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
date Tue, 10 Nov 2015 19:37:47 +0900
parents
children
comparison
equal deleted inserted replaced
0:48306867e651 1:84254e949b77
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;