Mercurial > hg > Members > nobuyasu > jungle-network
comparison src/main/java/app/bbs/codesegment/LogUpdateCodeSegment.java @ 141:7ce940e454f0
Modified LogUpdateCodeSegment
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 25 Jan 2014 20:30:22 +0900 |
parents | 00fcb468de27 |
children | 85dab752d0ac |
comparison
equal
deleted
inserted
replaced
140:09b405d0830b | 141:7ce940e454f0 |
---|---|
29 public void run() { | 29 public void run() { |
30 int index = log.index; | 30 int index = log.index; |
31 NetworkTreeOperationLog netLog = log.asClass(NetworkTreeOperationLog.class); | 31 NetworkTreeOperationLog netLog = log.asClass(NetworkTreeOperationLog.class); |
32 @SuppressWarnings("unchecked") | 32 @SuppressWarnings("unchecked") |
33 List<String> list = clist.asClass(List.class); | 33 List<String> list = clist.asClass(List.class); |
34 if (!log.from.equals("local")) { | |
35 Either<Error, JungleTreeEditor> either = BulletinBoardJungleManager.update(netLog); | |
36 if(either.isA()) { | |
37 /* Should throw after new LogUpdateCodeSegment */ | |
38 throw new IllegalStateException(); | |
39 } | |
40 } | |
41 for (String node : list) { | 34 for (String node : list) { |
42 if (!node.equals(log.from)) { | 35 if (!node.equals(log.from)) { |
43 ods.put(node, log.key, log.getVal()); | 36 ods.put(node, log.key, log.getVal()); |
44 } | 37 } |
45 } | 38 } |
39 if (!log.from.equals("local")) { | |
40 Either<Error, JungleTreeEditor> either = BulletinBoardJungleManager.update(netLog); | |
41 if(either.isA()) { | |
42 new LogUpdateCodeSegment(index); | |
43 throw new IllegalStateException(); | |
44 } | |
45 } | |
46 new LogUpdateCodeSegment(index); | 46 new LogUpdateCodeSegment(index); |
47 } | 47 } |
48 } | 48 } |