comparison src/main/java/alice/datasegment/CompressedRemoteDataSegmentManager.java @ 530:4aeebea0c9b5 dispose

can't unzip
author Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
date Sun, 03 May 2015 10:04:28 +0900
parents cb7c31848d16
children b3c9554ccb1b
comparison
equal deleted inserted replaced
529:cb7c31848d16 530:4aeebea0c9b5
97 97
98 @Override 98 @Override
99 public void take(Receiver receiver, CodeSegment cs, SendOption option) { 99 public void take(Receiver receiver, CodeSegment cs, SendOption option) {
100 int seq = this.seq.getAndIncrement(); 100 int seq = this.seq.getAndIncrement();
101 Command cmd = new Command(CommandType.TAKE, receiver, receiver.key, null, receiver.index, seq, replyQueue, cs, null); 101 Command cmd = new Command(CommandType.TAKE, receiver, receiver.key, null, receiver.index, seq, replyQueue, cs, null);
102 cmd.setCompressFlag(option.isCompress());
102 cmd.setQuickFlag(option.isQuick()); 103 cmd.setQuickFlag(option.isQuick());
104
103 seqHash.put(seq, cmd); 105 seqHash.put(seq, cmd);
104 if (option.isQuick()){ 106 if (option.isQuick()){
105 connection.write(cmd); 107 connection.write(cmd);
106 } else { 108 } else {
107 connection.sendCommand(cmd); 109 connection.sendCommand(cmd);
112 114
113 @Override 115 @Override
114 public void peek(Receiver receiver, CodeSegment cs, SendOption option) { 116 public void peek(Receiver receiver, CodeSegment cs, SendOption option) {
115 int seq = this.seq.getAndIncrement(); 117 int seq = this.seq.getAndIncrement();
116 Command cmd = new Command(CommandType.PEEK, receiver, receiver.key, null, receiver.index, seq, replyQueue, cs, null); 118 Command cmd = new Command(CommandType.PEEK, receiver, receiver.key, null, receiver.index, seq, replyQueue, cs, null);
119 cmd.setCompressFlag(option.isCompress());
117 cmd.setQuickFlag(option.isQuick()); 120 cmd.setQuickFlag(option.isQuick());
121
118 seqHash.put(seq, cmd); 122 seqHash.put(seq, cmd);
119 if (option.isQuick()){ 123 if (option.isQuick()){
120 connection.write(cmd); 124 connection.write(cmd);
121 } else { 125 } else {
122 connection.sendCommand(cmd); 126 connection.sendCommand(cmd);