Mercurial > hg > Database > Alice
annotate src/alice/test/codesegment/local/TestCodeSegment.java @ 182:52a1fa5ba38b working
add filp api
author | e095732 |
---|---|
date | Tue, 26 Feb 2013 13:46:18 +0900 |
parents | d7816b9b72e9 |
children | 75150396681c |
rev | line source |
---|---|
22
2ca2d961a8d2
implements outline of TopologyManager
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
19
diff
changeset
|
1 package alice.test.codesegment.local; |
3 | 2 |
3 import alice.codesegment.CodeSegment; | |
18
72dd27d952b0
change InputDataSegment API
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
16
diff
changeset
|
4 import alice.datasegment.CommandType; |
33
20c67f673224
change name of DataSegmentReceiver
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
32
diff
changeset
|
5 import alice.datasegment.Receiver; |
3 | 6 |
7 public class TestCodeSegment extends CodeSegment { | |
8 | |
119 | 9 static int count = 0; |
10 | |
57 | 11 // create input datasegment arg1 |
182 | 12 Receiver arg1 = ids.create(CommandType.PEEK); |
97 | 13 public TestCodeSegment(){ |
14 arg1.setKey("key1"); | |
15 } | |
16 public TestCodeSegment(int index){ | |
17 arg1.setKey("key1",index); | |
18 } | |
16 | 19 |
3 | 20 @Override |
21 public void run() { | |
132 | 22 //System.out.println("index = " + arg1.index); |
182 | 23 //System.out.println("data = " + arg1.val); |
132 | 24 //System.out.println(arg1.val.getType()); |
182 | 25 if(count > 10000){ |
26 System.out.println(System.currentTimeMillis() - StartCodeSegment.t); | |
27 System.exit(1); | |
28 } | |
150 | 29 |
30 /* | |
18
72dd27d952b0
change InputDataSegment API
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
16
diff
changeset
|
31 TestCodeSegment cs = new TestCodeSegment(); |
71
a3a2605e16a2
change checking debug mode of logger
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
57
diff
changeset
|
32 cs.arg1.setKey("key1", arg1.index); |
97 | 33 */ |
182 | 34 ods.update("local","key1",arg1.asInteger()+1); |
35 //ods.flip(arg1, arg1.asInteger()+1); | |
169 | 36 new TestCodeSegment(); |
37 //new TestCodeSegment(arg1.index); | |
38 | |
182 | 39 count++; |
57 | 40 // DataSegment.get("local").update |
169 | 41 //ods.update("local", "key1", arg1.index); |
119 | 42 |
3 | 43 } |
44 | |
45 } |