Mercurial > hg > Database > Alice
annotate src/main/java/alice/topology/node/IncomingConnectionInfo.java @ 523:145c425db88d dispose
add CompressedLDSM
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 09 Apr 2015 18:36:26 +0900 |
parents | 80e461aa10e9 |
children | 0832af83583f 767d93626b88 1a860019b2fe ded89ea8861f 8f765e3eed24 8d9f35701fdb |
rev | line source |
---|---|
345 | 1 package alice.topology.node; |
2 | |
3 import alice.codesegment.CodeSegment; | |
4 import alice.datasegment.CommandType; | |
5 import alice.datasegment.DataSegment; | |
6 import alice.datasegment.Receiver; | |
7 import alice.topology.HostMessage; | |
8 | |
9 public class IncomingConnectionInfo extends CodeSegment { | |
10 | |
419 | 11 public Receiver hostInfo = ids.create(CommandType.TAKE); |
12 private String absName; | |
13 private int count; | |
404 | 14 |
419 | 15 public IncomingConnectionInfo(String absName, int count) { |
16 this.absName = absName; | |
17 this.count = count; | |
18 } | |
404 | 19 |
345 | 20 |
419 | 21 @Override |
22 public void run() { | |
23 if (this.hostInfo.getVal() == null) { | |
24 ods.put("local", "configNodeNum", count); | |
25 } else { | |
26 HostMessage hostInfo = this.hostInfo.asClass(HostMessage.class); | |
429 | 27 if (DataSegment.contains(hostInfo.connectionName)) { |
485
45b3fe2375ef
reconnetion process will execute after disconnection event
sugi
parents:
467
diff
changeset
|
28 // need to wait remove by DeleteConnection |
45b3fe2375ef
reconnetion process will execute after disconnection event
sugi
parents:
467
diff
changeset
|
29 ods.put("manager", absName, hostInfo); |
429 | 30 } else { |
485
45b3fe2375ef
reconnetion process will execute after disconnection event
sugi
parents:
467
diff
changeset
|
31 DataSegment.connect(hostInfo.connectionName, hostInfo.reverseName, hostInfo.name, hostInfo.port); |
45b3fe2375ef
reconnetion process will execute after disconnection event
sugi
parents:
467
diff
changeset
|
32 ods.put(hostInfo.connectionName, "reverseKey", hostInfo.reverseName); |
495 | 33 count++; |
523
145c425db88d
add CompressedLDSM
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
517
diff
changeset
|
34 |
145c425db88d
add CompressedLDSM
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
517
diff
changeset
|
35 ods.put("cMember", hostInfo.connectionName); |
145c425db88d
add CompressedLDSM
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
517
diff
changeset
|
36 new CreateConnectionList(); |
467 | 37 } |
523
145c425db88d
add CompressedLDSM
Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
parents:
517
diff
changeset
|
38 |
419 | 39 } |
467 | 40 |
419 | 41 IncomingConnectionInfo cs = new IncomingConnectionInfo(absName, count); |
42 cs.hostInfo.setKey("manager", absName); | |
43 } | |
345 | 44 |
45 } |