43
|
1 package christie.topology.manager;
|
|
2
|
|
3 import christie.annotation.Peek;
|
|
4 import christie.annotation.Take;
|
|
5 import christie.codegear.CodeGear;
|
|
6 import christie.codegear.CodeGearManager;
|
176
|
7 import christie.topology.Message;
|
43
|
8
|
|
9
|
|
10 public class TopologyFinish extends CodeGear {
|
64
|
11 @Take
|
176
|
12 Message FINISHMESSAGE;
|
64
|
13
|
43
|
14 @Peek
|
60
|
15 TopologyManagerConfig topologyManagerConfig;
|
43
|
16
|
|
17 @Take
|
|
18 Long startTime;
|
|
19
|
|
20 @Override
|
|
21 protected void run(CodeGearManager cgm) {
|
127
|
22 if (topologyManagerConfig.showTime) {
|
|
23 System.out.println("TopologymanagerTime = " + (System.currentTimeMillis() - startTime));
|
|
24 }
|
43
|
25
|
127
|
26
|
|
27 for(String dgm : cgm.getDGMList().keySet()){
|
176
|
28 getDGM(dgm).put("_CLOSEMESSEAGE", new Message());
|
127
|
29 getDGM(dgm).shutdown();
|
43
|
30 }
|
127
|
31
|
|
32 getLocalDGM().finish();
|
|
33
|
43
|
34 }
|
|
35
|
|
36 }
|