Mercurial > hg > Members > shoshi > jungle > jungle-core
changeset 347:ae75a2d618f4
stop loop but not correct work
author | nozomi |
---|---|
date | Fri, 15 Sep 2017 18:10:54 +0900 |
parents | f7a5189d94d7 |
children | 944baaa4d345 |
files | src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/codesegment/LogUpdateCodeSegment.java |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/codesegment/LogUpdateCodeSegment.java Thu Sep 14 19:27:15 2017 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/codesegment/LogUpdateCodeSegment.java Fri Sep 15 18:10:54 2017 +0900 @@ -33,17 +33,19 @@ public void run() { int index = log.index; - new LogUpdateCodeSegment(); + NetworkTreeOperationLog netLog = log.asClass(NetworkTreeOperationLog.class); @SuppressWarnings("unchecked") List<String> list = clist.asClass(List.class); - for (String node : list) { + for (String node : list) {//他ノードへlogの書き込み if (!node.equals(log.from)) { ods.put(node, log.key, log.getVal()); + new LogUpdateCodeSegment(); } } + JungleDistributedUpdator u = updator.asClass(JungleDistributedUpdator.class); - if (!log.from.equals("local")) { + if (!log.from.equals("local")) {//ほかノードからのlogの更新 Either<Error, JungleTreeEditor> either = u.update(netLog); if(either.isA()) { new LogUpdateCodeSegment(index);