comparison src/main/java/christie/topology/node/PrepareToClose.java @ 49:fd944876257b

add node and keepalive
author akahori
date Thu, 23 Aug 2018 09:29:05 +0900
parents
children 76b6da075ce0
comparison
equal deleted inserted replaced
48:174a2f37ec28 49:fd944876257b
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
16 @Take
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());
42 getLocalDGM().put("_CLIST", _CLIST);
43
44 }
45
46 }