49
|
1 package christie.topology.node;
|
|
2
|
|
3 import christie.annotation.Peek;
|
61
|
4 import christie.annotation.Take;
|
49
|
5 import christie.codegear.CodeGear;
|
|
6 import christie.codegear.CodeGearManager;
|
|
7 import christie.daemon.Config;
|
|
8 import christie.topology.manager.keepalive.KeepAlive;
|
|
9 import org.msgpack.type.ValueFactory;
|
|
10
|
|
11 public class ConfigurationFinish extends CodeGear {
|
|
12
|
|
13 @Peek
|
|
14 int reverseCount;
|
|
15
|
|
16 @Peek
|
68
|
17 int connectNodeNum;
|
49
|
18
|
|
19 @Peek
|
68
|
20 TopologyNodeConfig topologyNodeConfig;
|
|
21
|
61
|
22 public ConfigurationFinish() {
|
49
|
23 }
|
|
24
|
|
25 @Override
|
|
26 protected void run(CodeGearManager cgm) {
|
68
|
27 if (reverseCount == connectNodeNum) {
|
|
28 getDGM(topologyNodeConfig.getManagerKey()).put("nodePrepareDone", "done");
|
71
|
29 cgm.setup(new Start());
|
49
|
30
|
68
|
31
|
|
32 /*if (topologyNodeConfig.useKeepAlive)
|
49
|
33 cgm.setup(new KeepAlive());
|
|
34 cgm.setup(new PrepareToClose());
|
68
|
35 ClosedEventManager.getInstance().register(DeleteConnection.class);
|
|
36 ClosedEventManager.getInstance().setKey();*/
|
49
|
37 return;
|
|
38 }
|
|
39
|
71
|
40 cgm.setup(new ConfigurationFinish());
|
49
|
41 }
|
|
42 }
|