Mercurial > hg > Database > Alice
comparison src/alice/datasegment/DataSegmentKey.java @ 298:4fe924c9f504
remove code
author | sugi |
---|---|
date | Tue, 22 Oct 2013 20:02:15 +0900 |
parents | 88be2824a989 |
children | a8255a831ade |
comparison
equal
deleted
inserted
replaced
297:f51ea581b0ff | 298:4fe924c9f504 |
---|---|
83 } | 83 } |
84 | 84 |
85 public void replyValue(Command cmd, DataSegmentValue data){ | 85 public void replyValue(Command cmd, DataSegmentValue data){ |
86 if (cmd.cs!=null){ // if cmd has cs-instance, it means Command from local. | 86 if (cmd.cs!=null){ // if cmd has cs-instance, it means Command from local. |
87 cmd.cs.ids.reply(cmd.receiver, new Command(CommandType.REPLY, null, null, data.val, data.obj, data.index, cmd.seq, null, null, data.from)); | 87 cmd.cs.ids.reply(cmd.receiver, new Command(CommandType.REPLY, null, null, data.val, data.obj, data.index, cmd.seq, null, null, data.from)); |
88 cmd = null; // someone has been holding instance. | |
89 } else { | 88 } else { |
90 try { | 89 try { |
91 if (!cmd.flag){ | 90 if (!cmd.flag){ |
92 cmd.connection.sendQueue.put(new Command(CommandType.REPLY, null, null, data.val, data.obj, data.index, cmd.seq, null, null, data.from)); | 91 cmd.connection.sendQueue.put(new Command(CommandType.REPLY, null, null, data.val, data.obj, data.index, cmd.seq, null, null, data.from)); |
93 } | 92 } |
94 else { | 93 else { |
95 cmd.connection.write(new Command(CommandType.REPLY, null, null, data.val, data.obj, data.index, cmd.seq, null, null, data.from)); | 94 cmd.connection.write(new Command(CommandType.REPLY, null, null, data.val, data.obj, data.index, cmd.seq, null, null, data.from)); |
96 cmd = null; | |
97 } | 95 } |
98 | 96 |
99 } catch (InterruptedException e) { | 97 } catch (InterruptedException e) { |
100 e.printStackTrace(); | 98 e.printStackTrace(); |
101 } | 99 } |