Mercurial > hg > Database > Alice
annotate src/alice/topology/node/Start.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 | ae24d5d40c10 |
children | f84e1684c6be |
rev | line source |
---|---|
35
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 package alice.topology.node; |
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 |
45
ae24d5d40c10
add to calculate the time of RingTopology required
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
35
diff
changeset
|
3 import org.apache.log4j.Logger; |
ae24d5d40c10
add to calculate the time of RingTopology required
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
35
diff
changeset
|
4 |
35
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 import alice.codesegment.CodeSegment; |
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 import alice.datasegment.CommandType; |
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 import alice.datasegment.Receiver; |
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 |
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9 public class Start extends CodeSegment { |
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 |
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 public Receiver done = ids.create(CommandType.PEEK); |
45
ae24d5d40c10
add to calculate the time of RingTopology required
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
35
diff
changeset
|
12 private Logger logger = Logger.getLogger(Start.class); |
46 | 13 private CodeSegment startCS; |
35
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 |
46 | 15 public Start(CodeSegment startCS) { |
16 this.startCS = startCS; | |
35
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
17 } |
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 |
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
19 @Override |
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
20 public void run() { |
45
ae24d5d40c10
add to calculate the time of RingTopology required
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
35
diff
changeset
|
21 logger.info("Configuration finished."); |
46 | 22 if (startCS == null) |
35
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
23 return; |
46 | 24 startCS.execute(); |
35
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
25 } |
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
26 |
ac3b48c5f4da
share width each other with tree
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
27 } |