Mercurial > hg > Database > Alice
comparison src/main/java/alice/topology/manager/ConfigWaiter.java @ 419:aefbe41fcf12 dispose
change tab to space
author | sugi |
---|---|
date | Tue, 15 Jul 2014 16:00:22 +0900 |
parents | 91e1b063a89f |
children | 59e84cd75403 |
comparison
equal
deleted
inserted
replaced
418:a269a019f5f8 | 419:aefbe41fcf12 |
---|---|
5 import alice.codesegment.CodeSegment; | 5 import alice.codesegment.CodeSegment; |
6 import alice.datasegment.CommandType; | 6 import alice.datasegment.CommandType; |
7 import alice.datasegment.Receiver; | 7 import alice.datasegment.Receiver; |
8 | 8 |
9 public class ConfigWaiter extends CodeSegment { | 9 public class ConfigWaiter extends CodeSegment { |
10 | |
11 public Receiver done = ids.create(CommandType.TAKE); | |
12 public int count; | |
13 | |
14 public ConfigWaiter(int nodeNum) { | |
15 this.count = nodeNum; | |
16 } | |
17 | 10 |
18 @Override | 11 public Receiver done = ids.create(CommandType.TAKE); |
19 public void run() { | 12 public int count; |
20 count--; | 13 |
21 if (count == 0) { | 14 public ConfigWaiter(int nodeNum) { |
22 ods.put("local", "start", ValueFactory.createNilValue()); | 15 this.count = nodeNum; |
23 return; | 16 } |
24 } | 17 |
25 ConfigWaiter cs3 = new ConfigWaiter(count); | 18 @Override |
26 cs3.done.setKey("local", "done"); | 19 public void run() { |
27 } | 20 count--; |
21 if (count == 0) { | |
22 ods.put("local", "start", ValueFactory.createNilValue()); | |
23 return; | |
24 } | |
25 ConfigWaiter cs3 = new ConfigWaiter(count); | |
26 cs3.done.setKey("local", "done"); | |
27 } | |
28 | 28 |
29 } | 29 } |