annotate src/main/java/alice/topology/node/CreateConnectionList.java @ 518:fc313323c53b dispose

add reconnect event
author sugi
date Thu, 22 Jan 2015 16:01:32 +0900
parents aefbe41fcf12
children 15eeb439830c 767d93626b88 3284428f525e 8d9f35701fdb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
416
6508ed6ea6a6 create Connection List in CreateConnection CodeSegment
sugi
parents:
diff changeset
1 package alice.topology.node;
6508ed6ea6a6 create Connection List in CreateConnection CodeSegment
sugi
parents:
diff changeset
2
6508ed6ea6a6 create Connection List in CreateConnection CodeSegment
sugi
parents:
diff changeset
3 import java.util.List;
6508ed6ea6a6 create Connection List in CreateConnection CodeSegment
sugi
parents:
diff changeset
4
6508ed6ea6a6 create Connection List in CreateConnection CodeSegment
sugi
parents:
diff changeset
5 import alice.codesegment.CodeSegment;
6508ed6ea6a6 create Connection List in CreateConnection CodeSegment
sugi
parents:
diff changeset
6 import alice.datasegment.CommandType;
6508ed6ea6a6 create Connection List in CreateConnection CodeSegment
sugi
parents:
diff changeset
7 import alice.datasegment.Receiver;
6508ed6ea6a6 create Connection List in CreateConnection CodeSegment
sugi
parents:
diff changeset
8
6508ed6ea6a6 create Connection List in CreateConnection CodeSegment
sugi
parents:
diff changeset
9 public class CreateConnectionList extends CodeSegment {
419
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
10 private Receiver info = ids.create(CommandType.TAKE); // connection List
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
11 private Receiver info1 = ids.create(CommandType.TAKE); // connection names
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
12
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
13 public CreateConnectionList() {
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
14 info.setKey("_CLIST");
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
15 info1.setKey("cMember");
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
16 }
416
6508ed6ea6a6 create Connection List in CreateConnection CodeSegment
sugi
parents:
diff changeset
17
419
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
18 @Override
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
19 public void run() {
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
20 @SuppressWarnings("unchecked")
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
21 List<String> cList = info.asClass(List.class);
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
22 String name = info1.asString();
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
23 cList.add(name);
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
24 ods.update(info.key, cList);
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
25
aefbe41fcf12 change tab to space
sugi
parents: 416
diff changeset
26 }
416
6508ed6ea6a6 create Connection List in CreateConnection CodeSegment
sugi
parents:
diff changeset
27
6508ed6ea6a6 create Connection List in CreateConnection CodeSegment
sugi
parents:
diff changeset
28 }