38
|
1 package christie.topology.manager;
|
|
2
|
60
|
3 import christie.annotation.Peek;
|
38
|
4 import christie.codegear.CodeGear;
|
|
5 import christie.codegear.CodeGearManager;
|
|
6
|
41
|
7 import java.util.HashMap;
|
|
8 import java.util.LinkedList;
|
|
9
|
45
|
10 import christie.topology.HostMessage;
|
41
|
11
|
38
|
12 public class TopologyManager extends CodeGear {
|
|
13
|
74
|
14 @Peek
|
|
15 TopologyManagerConfig topologyManagerConfig;
|
|
16
|
60
|
17 public TopologyManager() {
|
45
|
18 }
|
41
|
19
|
38
|
20 @Override
|
|
21 protected void run(CodeGearManager cgm) {
|
41
|
22 cgm.setup(new CheckComingHost());
|
45
|
23 getLocalDGM().put("absCookieTable", new HashMap<String, String>());
|
|
24
|
74
|
25 if(!topologyManagerConfig.dynamic) {
|
|
26 cgm.setup(new FileParser());
|
|
27 cgm.setup(new IncomingHosts());
|
|
28 cgm.setup(new ConfigWaiter());
|
|
29 getLocalDGM().put("running", false);
|
|
30 }
|
|
31
|
45
|
32 cgm.setup(new CreateHash());
|
|
33 cgm.setup(new TopologyFinish());
|
38
|
34
|
73
|
35 getLocalDGM().put("topology", new HashMap<String, HashMap<String, HostMessage>>());
|
|
36 getLocalDGM().put("createdList", new LinkedList<String>());
|
|
37
|
38
|
38 }
|
|
39
|
41
|
40
|
38
|
41 }
|