Mercurial > hg > Database > Alice
changeset 131:2b991e8b7fc0 working
minor change
author | sugi |
---|---|
date | Tue, 14 Aug 2012 12:55:28 +0900 |
parents | 1b142e37375f |
children | 1044a79ce4ef |
files | src/alice/codesegment/InputDataSegment.java src/alice/test/codesegment/local/StartCodeSegment.java src/alice/test/codesegment/local/TestCodeSegment.java src/alice/test/topology/fishmodel/alpha/LookData.java |
diffstat | 4 files changed, 9 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alice/codesegment/InputDataSegment.java Mon Aug 06 18:05:51 2012 +0900 +++ b/src/alice/codesegment/InputDataSegment.java Tue Aug 14 12:55:28 2012 +0900 @@ -76,9 +76,6 @@ public void receive() { if (count.decrementAndGet() == 0) { CodeSegmentManager.submit(cs); - cs.ods.cs = null; - cs = null; // TODO - } }
--- a/src/alice/test/codesegment/local/StartCodeSegment.java Mon Aug 06 18:05:51 2012 +0900 +++ b/src/alice/test/codesegment/local/StartCodeSegment.java Tue Aug 14 12:55:28 2012 +0900 @@ -8,18 +8,19 @@ @Override public void run() { System.out.println("run StartCodeSegment"); + /* TestCodeSegment cs = new TestCodeSegment(); cs.arg1.setKey("key1"); // unbound datasegment key1 is created and connect to cs. // cs is waiting for local.key1 - + ods.update("local", "key1", 0); // bind string data to datasegment local.key1 + // this startup TestCodeSegment. */ - new TestCodeSegment(); + new TestCodeSegment(); System.out.println("create TestCodeSegment"); - //ods.update("local", "key1", 0); - ods.update("local", "key1", new FishPoint(0.0f,0.0f)); // bind string data to datasegment local.key1 - // this startup TestCodeSegment. + ods.update("local", "key1", new FishPoint(0.0f,0.0f)); + }
--- a/src/alice/test/codesegment/local/TestCodeSegment.java Mon Aug 06 18:05:51 2012 +0900 +++ b/src/alice/test/codesegment/local/TestCodeSegment.java Tue Aug 14 12:55:28 2012 +0900 @@ -21,8 +21,7 @@ @Override public void run() { FishPoint fp = this.arg1.asClass(FishPoint.class); - //System.out.println("index = " + arg1.index); - System.out.println("count = " + count); + System.out.println("index = " + arg1.index); System.out.println("data = " + arg1.val); System.out.println(arg1.val.getType()); @@ -31,20 +30,14 @@ System.exit(0); return; } - */ - //FP.setXY(FP.getX()+1.0f,FP.getY()); - /* + TestCodeSegment cs = new TestCodeSegment(); cs.arg1.setKey("key1", arg1.index); */ new TestCodeSegment(arg1.index); + // DataSegment.get("local").update - - if (count++>1000) { - System.out.println(count); - - } ods.update("local", "key1", fp); }
--- a/src/alice/test/topology/fishmodel/alpha/LookData.java Mon Aug 06 18:05:51 2012 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -package alice.test.topology.fishmodel.alpha; - -import alice.codesegment.CodeSegment; -import alice.datasegment.CommandType; -import alice.datasegment.Receiver; - - -public class LookData extends CodeSegment{ - - private Receiver data = ids.create(CommandType.PEEK); - String key; - public LookData(String key,int index){ - this.key = key; - this.data.setKey("local", key, index); - } - - @Override - public void run(){ - System.out.println(data.val+";"+data.from); - new LookData(this.key,this.data.index); - - } - - -}