Mercurial > hg > Members > shoshi > jungle > jungle-core
comparison src/main/java/jp/ac/u_ryukyu/ie/cr/jungleNetwork/codesegment/LogUpdateCodeSegment.java @ 347:ae75a2d618f4
stop loop but not correct work
author | nozomi |
---|---|
date | Fri, 15 Sep 2017 18:10:54 +0900 |
parents | 7d40ac7e693f |
children | 944baaa4d345 |
comparison
equal
deleted
inserted
replaced
346:f7a5189d94d7 | 347:ae75a2d618f4 |
---|---|
31 updator.setKey("updator"); | 31 updator.setKey("updator"); |
32 } | 32 } |
33 | 33 |
34 public void run() { | 34 public void run() { |
35 int index = log.index; | 35 int index = log.index; |
36 new LogUpdateCodeSegment(); | 36 |
37 NetworkTreeOperationLog netLog = log.asClass(NetworkTreeOperationLog.class); | 37 NetworkTreeOperationLog netLog = log.asClass(NetworkTreeOperationLog.class); |
38 @SuppressWarnings("unchecked") | 38 @SuppressWarnings("unchecked") |
39 List<String> list = clist.asClass(List.class); | 39 List<String> list = clist.asClass(List.class); |
40 for (String node : list) { | 40 for (String node : list) {//他ノードへlogの書き込み |
41 if (!node.equals(log.from)) { | 41 if (!node.equals(log.from)) { |
42 ods.put(node, log.key, log.getVal()); | 42 ods.put(node, log.key, log.getVal()); |
43 new LogUpdateCodeSegment(); | |
43 } | 44 } |
44 } | 45 } |
46 | |
45 JungleDistributedUpdator u = updator.asClass(JungleDistributedUpdator.class); | 47 JungleDistributedUpdator u = updator.asClass(JungleDistributedUpdator.class); |
46 if (!log.from.equals("local")) { | 48 if (!log.from.equals("local")) {//ほかノードからのlogの更新 |
47 Either<Error, JungleTreeEditor> either = u.update(netLog); | 49 Either<Error, JungleTreeEditor> either = u.update(netLog); |
48 if(either.isA()) { | 50 if(either.isA()) { |
49 new LogUpdateCodeSegment(index); | 51 new LogUpdateCodeSegment(index); |
50 throw new IllegalStateException(); | 52 throw new IllegalStateException(); |
51 } | 53 } |