Mercurial > hg > Database > Alice
annotate src/alice/test/codesegment/local/TestCodeSegment.java @ 183:75150396681c working
use synchronizedList
author | e095732 |
---|---|
date | Tue, 26 Feb 2013 14:24:23 +0900 |
parents | 52a1fa5ba38b |
children | 4475ba30238f |
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 */ |
183 | 34 //ods.update("key1",arg1.asInteger()+1); |
35 //ods.update("local","key1",arg1.asInteger()+1); | |
36 ods.flip(arg1, arg1.asInteger()+1); | |
169 | 37 new TestCodeSegment(); |
38 //new TestCodeSegment(arg1.index); | |
39 | |
182 | 40 count++; |
57 | 41 // DataSegment.get("local").update |
169 | 42 //ods.update("local", "key1", arg1.index); |
119 | 43 |
3 | 44 } |
45 | |
46 } |