annotate src/main/java/christie/topology/node/IncomingConnectionInfo.java @ 198:dd3c0ba6a0a6

fix topology manager
author akahori
date Sat, 09 Mar 2019 21:53:37 +0900
parents a0be7c83fff8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
1 package christie.topology.node;
fd944876257b add node and keepalive
akahori
parents:
diff changeset
2
fd944876257b add node and keepalive
akahori
parents:
diff changeset
3
66
4e2453333508 del IncomingAbstractHostName
akahori
parents: 65
diff changeset
4 import christie.annotation.Peek;
65
5deea416f980 fix variable name
akahori
parents: 61
diff changeset
5 import christie.annotation.Take;
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
6 import christie.codegear.CodeGear;
fd944876257b add node and keepalive
akahori
parents:
diff changeset
7 import christie.codegear.CodeGearManager;
fd944876257b add node and keepalive
akahori
parents:
diff changeset
8 import christie.topology.HostMessage;
176
6eb548c188e5 update add Message
akahori
parents: 170
diff changeset
9 import christie.topology.Message;
168
c7300be0fff6 fix incomingHosts end message
akahori
parents: 158
diff changeset
10 import christie.topology.TopologyDataGear;
88
e4d16deb9627 del Logger
akahori
parents: 76
diff changeset
11
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
12
fd944876257b add node and keepalive
akahori
parents:
diff changeset
13 public class IncomingConnectionInfo extends CodeGear {
fd944876257b add node and keepalive
akahori
parents:
diff changeset
14
65
5deea416f980 fix variable name
akahori
parents: 61
diff changeset
15 @Take
5deea416f980 fix variable name
akahori
parents: 61
diff changeset
16 HostMessage remoteNodeInfo;
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
17
168
c7300be0fff6 fix incomingHosts end message
akahori
parents: 158
diff changeset
18
176
6eb548c188e5 update add Message
akahori
parents: 170
diff changeset
19 int count;
6eb548c188e5 update add Message
akahori
parents: 170
diff changeset
20
66
4e2453333508 del IncomingAbstractHostName
akahori
parents: 65
diff changeset
21 public IncomingConnectionInfo() {
158
e295cb59e514 update refactor topology manager
akahori
parents: 121
diff changeset
22 this.count = 0;
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
23 }
fd944876257b add node and keepalive
akahori
parents:
diff changeset
24
168
c7300be0fff6 fix incomingHosts end message
akahori
parents: 158
diff changeset
25 public IncomingConnectionInfo(int count) {
c7300be0fff6 fix incomingHosts end message
akahori
parents: 158
diff changeset
26 this.count = count;
c7300be0fff6 fix incomingHosts end message
akahori
parents: 158
diff changeset
27 }
c7300be0fff6 fix incomingHosts end message
akahori
parents: 158
diff changeset
28
158
e295cb59e514 update refactor topology manager
akahori
parents: 121
diff changeset
29
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
30 @Override
fd944876257b add node and keepalive
akahori
parents:
diff changeset
31 protected void run(CodeGearManager cgm) {
94
87a203c99177 update HostMessage refactor
akahori
parents: 88
diff changeset
32 String connectionName = remoteNodeInfo.getConnectionName();
61
20d4c0cce914 refactor Topology Node
akahori
parents: 59
diff changeset
33
168
c7300be0fff6 fix incomingHosts end message
akahori
parents: 158
diff changeset
34 cgm.createRemoteDGM(connectionName,
c7300be0fff6 fix incomingHosts end message
akahori
parents: 158
diff changeset
35 remoteNodeInfo.getHostName(),
c7300be0fff6 fix incomingHosts end message
akahori
parents: 158
diff changeset
36 remoteNodeInfo.getPort());
158
e295cb59e514 update refactor topology manager
akahori
parents: 121
diff changeset
37
195
a0be7c83fff8 add connectionList
akahori
parents: 176
diff changeset
38
176
6eb548c188e5 update add Message
akahori
parents: 170
diff changeset
39 getDGM(connectionName).put("_CONNECTIONMESSAGE",new Message());
195
a0be7c83fff8 add connectionList
akahori
parents: 176
diff changeset
40 cgm.setup(new CreateConnectionList());
a0be7c83fff8 add connectionList
akahori
parents: 176
diff changeset
41 getLocalDGM().put("cMember", connectionName);
168
c7300be0fff6 fix incomingHosts end message
akahori
parents: 158
diff changeset
42
176
6eb548c188e5 update add Message
akahori
parents: 170
diff changeset
43 cgm.setup(new IncomingConnectionInfo(count + 1));
49
fd944876257b add node and keepalive
akahori
parents:
diff changeset
44 }
fd944876257b add node and keepalive
akahori
parents:
diff changeset
45
fd944876257b add node and keepalive
akahori
parents:
diff changeset
46 }