Mercurial > hg > Database > Alice
comparison src/alice/test/codesegment/local/TestCodeSegment.java @ 169:16418c2c3e72 working
minor change
author | sugi |
---|---|
date | Tue, 18 Dec 2012 14:49:36 +0900 |
parents | 206c7dd9cb48 |
children | d7816b9b72e9 |
comparison
equal
deleted
inserted
replaced
168:f846527a98b7 | 169:16418c2c3e72 |
---|---|
1 package alice.test.codesegment.local; | 1 package alice.test.codesegment.local; |
2 | 2 |
3 import alice.codesegment.CodeSegment; | 3 import alice.codesegment.CodeSegment; |
4 import alice.datasegment.CommandType; | 4 import alice.datasegment.CommandType; |
5 import alice.datasegment.Receiver; | 5 import alice.datasegment.Receiver; |
6 import alice.test.topology.aquarium.FishPoint; | |
7 | 6 |
8 public class TestCodeSegment extends CodeSegment { | 7 public class TestCodeSegment extends CodeSegment { |
9 | 8 |
10 static int count = 0; | 9 static int count = 0; |
11 | 10 |
18 arg1.setKey("key1",index); | 17 arg1.setKey("key1",index); |
19 } | 18 } |
20 | 19 |
21 @Override | 20 @Override |
22 public void run() { | 21 public void run() { |
23 FishPoint fp = this.arg1.asClass(FishPoint.class); | |
24 //System.out.println("index = " + arg1.index); | 22 //System.out.println("index = " + arg1.index); |
25 //System.out.println("data = " + arg1.val); | 23 System.out.println("data = " + arg1.val); |
26 //System.out.println(arg1.val.getType()); | 24 //System.out.println(arg1.val.getType()); |
27 | 25 |
28 | 26 |
29 if (arg1.index > 100000) { | |
30 System.out.println(System.currentTimeMillis()-TestLocalAlice.t); | |
31 System.exit(0); | |
32 return; | |
33 } | |
34 /* | 27 /* |
35 TestCodeSegment cs = new TestCodeSegment(); | 28 TestCodeSegment cs = new TestCodeSegment(); |
36 cs.arg1.setKey("key1", arg1.index); | 29 cs.arg1.setKey("key1", arg1.index); |
37 */ | 30 */ |
38 | 31 |
39 new TestCodeSegment(arg1.index); | 32 new TestCodeSegment(); |
40 fp.setXYZ(fp.getX()+1.0f, fp.getY()+1.0f, fp.getZ()+1.0f); | 33 //new TestCodeSegment(arg1.index); |
34 | |
35 | |
41 // DataSegment.get("local").update | 36 // DataSegment.get("local").update |
42 ods.update("local", "key1", fp); | 37 //ods.update("local", "key1", arg1.index); |
43 | 38 |
44 } | 39 } |
45 | 40 |
46 } | 41 } |