Mercurial > hg > Database > Alice
annotate src/alice/test/topology/share/SendData.java @ 212:b5daccf36104 working
add Receiver state pattern
author | one |
---|---|
date | Wed, 27 Mar 2013 17:30:52 +0900 |
parents | ae6ed9c35288 |
children | fec0726bb126 |
rev | line source |
---|---|
147 | 1 package alice.test.topology.share; |
2 | |
3 import alice.codesegment.CodeSegment; | |
4 import alice.datasegment.CommandType; | |
5 import alice.datasegment.Receiver; | |
6 | |
7 public class SendData extends CodeSegment{ | |
8 private Receiver data = ids.create(CommandType.PEEK); | |
9 | |
10 public SendData(int index){ | |
11 this.data.setKey("local", "data", index); | |
12 } | |
13 | |
14 @Override | |
15 public void run(){ | |
212 | 16 new SendData(this.data.data.index); |
17 ods.put("parent", "data", this.data.data.val); | |
147 | 18 } |
19 | |
20 } |