49
|
1 package christie.topology.node;
|
|
2
|
|
3
|
|
4 import christie.annotation.Peek;
|
|
5 import christie.annotation.Take;
|
|
6 import christie.codegear.CodeGear;
|
|
7 import christie.codegear.CodeGearManager;
|
|
8
|
|
9 import java.util.List;
|
|
10
|
|
11 public class PrepareToClose extends CodeGear {
|
|
12
|
|
13 @Peek
|
|
14 String _CLOSEMESSEAGE;
|
|
15
|
59
|
16 @Peek
|
49
|
17 List<String> _CLIST;
|
|
18
|
|
19
|
|
20 public PrepareToClose() {
|
|
21
|
|
22 }
|
|
23
|
|
24 @Override
|
|
25 protected void run(CodeGearManager cgm) {
|
|
26 /*
|
|
27 if (_CLIST.contains(_CLOSEMESSEAGE)) {
|
|
28 _CLIST.remove(_CLOSEMESSEAGE);
|
|
29
|
|
30 DataSegmentManager manager = DataSegment.get(_CLOSEMESSEAGE);
|
|
31 manager.setSendError(false);
|
|
32
|
|
33 ods.put(_CLOSEMESSEAGE, "_CLOSEREADY", _CLOSEMESSEAGE);
|
|
34 ods.put("_CLOSEREADY", _CLOSEMESSEAGE);
|
|
35
|
|
36 new CloseRemoteDataSegment();
|
|
37 } else {
|
|
38 // lost node is this node's parent, so already removed
|
|
39 new ReceiveCloseMessage(CommandType.TAKE);
|
|
40 }*/
|
|
41 cgm.setup(new PrepareToClose());
|
59
|
42 //getLocalDGM().put("_CLIST", _CLIST);
|
49
|
43
|
|
44 }
|
|
45
|
|
46 }
|