annotate src/alice/topology/node/ConfigurationFinish.java @ 46:1a498f436332

bug fix for time calculate
author kazz <kazz@cr.ie.u-ryukyu.ac.jp>
date Sat, 04 Feb 2012 16:03:05 +0900
parents 3155337e754e
children b5daccf36104
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);
46
1a498f436332 bug fix for time calculate
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 39
diff changeset
13 private CodeSegment startCS;
28
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
46
1a498f436332 bug fix for time calculate
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 39
diff changeset
15 public ConfigurationFinish(CodeSegment startCS) {
1a498f436332 bug fix for time calculate
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 39
diff changeset
16 this.startCS = startCS;
28
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
46
1a498f436332 bug fix for time calculate
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 39
diff changeset
24 Start cs = new Start(startCS);
35
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
46
1a498f436332 bug fix for time calculate
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 39
diff changeset
30 ConfigurationFinish cs3 = new ConfigurationFinish(startCS);
39
3155337e754e add logger
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 36
diff changeset
31 cs3.reverseCount.setKey("local", "reverseCount", this.reverseCount.index);
28
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 }