annotate src/alice/topology/node/ConfigurationFinish.java @ 36:0b25b48116b6

DistributedFish share width each other (not work)
author kazz <kazz@cr.ie.u-ryukyu.ac.jp>
date Fri, 20 Jan 2012 18:40:02 +0900
parents ac3b48c5f4da
children 3155337e754e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 package alice.topology.node;
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
35
ac3b48c5f4da share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
3 import org.msgpack.type.ValueFactory;
ac3b48c5f4da share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
4
28
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 import alice.codesegment.CodeSegment;
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 import alice.datasegment.CommandType;
33
20c67f673224 change name of DataSegmentReceiver
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
7 import alice.datasegment.Receiver;
28
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 public class ConfigurationFinish extends CodeSegment {
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
33
20c67f673224 change name of DataSegmentReceiver
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
11 public Receiver reverseCount = ids.create(CommandType.PEEK);
20c67f673224 change name of DataSegmentReceiver
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
12 public Receiver configNodeNum = ids.create(CommandType.PEEK);
30
b5a21baf0b07 implements RingTopology
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
13 private Class<? extends CodeSegment> clazz;
28
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
30
b5a21baf0b07 implements RingTopology
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
15 public ConfigurationFinish(Class<? extends CodeSegment> clazz) {
28
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 this.clazz = clazz;
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 }
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 @Override
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 public void run() {
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 if (reverseCount.val.equals(configNodeNum.val)) {
35
ac3b48c5f4da share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
22 ods.put("manager", "done", ValueFactory.createNilValue());
ac3b48c5f4da share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
23
ac3b48c5f4da share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
24 Start cs = new Start(clazz);
ac3b48c5f4da share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
25 cs.done.setKey("manager", "start");
ac3b48c5f4da share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
26
28
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 return;
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 }
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 ConfigurationFinish cs3 = new ConfigurationFinish(clazz);
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 cs3.reverseCount.setKey("local", "reverseCount");
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 cs3.configNodeNum.setKey("local", "configNodeNum");
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 }
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 }