Mercurial > hg > Members > tatsuki > Alice
diff src/alice/datasegment/DataSegmentKey.java @ 13:30f97d776a3e
implements Alice daemon
author | one |
---|---|
date | Fri, 13 Jan 2012 19:04:59 +0900 |
parents | c4d6ff56b9bf |
children | e3f1b21718b0 |
line wrap: on
line diff
--- a/src/alice/datasegment/DataSegmentKey.java Fri Jan 13 07:04:38 2012 +0900 +++ b/src/alice/datasegment/DataSegmentKey.java Fri Jan 13 19:04:59 2012 +0900 @@ -30,7 +30,7 @@ while (true) { try { Command cmd = cmdQueue.take(); - switch (cmd.cmdType) { + switch (cmd.type) { case UPDATE: if (dataList.size() != 0) { dataList.remove(0); @@ -43,9 +43,9 @@ LinkedList<Command> removeList = new LinkedList<Command>(); for (Command waitCmd : waitList) { if (waitCmd.index < index) { - waitCmd.manager.replyQueue.put(new Command(CommandType.REPLY, null, cmd.val, index, waitCmd.seq, null, null)); + waitCmd.replyQueue.put(new Command(CommandType.REPLY, null, cmd.val, index, waitCmd.seq, null, null)); removeList.add(waitCmd); - if (waitCmd.cmdType == CommandType.TAKE) { // delete data, if it run take cmd. + if (waitCmd.type == CommandType.TAKE) { // delete data, if it run take cmd. dataList.remove(dsv); break; } @@ -62,7 +62,7 @@ } for (DataSegmentValue data : dataList) { if (data.index > cmd.index) { - cmd.manager.replyQueue.put(new Command(CommandType.REPLY, null, data.val, data.index, cmd.seq, null, null)); + cmd.replyQueue.put(new Command(CommandType.REPLY, null, data.val, data.index, cmd.seq, null, null)); break; } } @@ -75,7 +75,7 @@ } for (DataSegmentValue data : dataList) { if (data.index > cmd.index) { - cmd.manager.replyQueue.put(new Command(CommandType.REPLY, null, data.val, data.index, cmd.seq, null, null)); + cmd.replyQueue.put(new Command(CommandType.REPLY, null, data.val, data.index, cmd.seq, null, null)); dataList.remove(data); break; }