401
|
1 package alice.topology.manager;
|
|
2
|
|
3 import org.msgpack.type.ValueFactory;
|
|
4
|
|
5 import alice.codesegment.CodeSegment;
|
|
6 import alice.datasegment.CommandType;
|
|
7 import alice.datasegment.Receiver;
|
|
8
|
|
9 public class ConfigWaiter extends CodeSegment {
|
419
|
10
|
|
11 public Receiver done = ids.create(CommandType.TAKE);
|
|
12 public int count;
|
|
13
|
|
14 public ConfigWaiter(int nodeNum) {
|
|
15 this.count = nodeNum;
|
|
16 }
|
401
|
17
|
419
|
18 @Override
|
|
19 public void run() {
|
|
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 }
|
401
|
28
|
|
29 }
|