comparison src/alice/datasegment/DataSegmentKey.java @ 236:ca1c9c477f54

AtomicInteger seq doesn't need for local
author sugi
date Sat, 30 Mar 2013 18:39:45 +0900
parents 4dc2f09a8f7a
children 88be2824a989
comparison
equal deleted inserted replaced
235:4dc2f09a8f7a 236:ca1c9c477f54
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 DataSegment.getLocal().getAndRemoveCmd(cmd.seq);
89 cmd = null; // someone has been holding instance. 88 cmd = null; // someone has been holding instance.
90 } else { 89 } else {
91 try { 90 try {
92 cmd.replyQueue.put(new Command(CommandType.REPLY, null, null, data.val, data.obj, data.index, cmd.seq, null, null, data.from)); 91 cmd.replyQueue.put(new Command(CommandType.REPLY, null, null, data.val, data.obj, data.index, cmd.seq, null, null, data.from));
93 } catch (InterruptedException e) { 92 } catch (InterruptedException e) {