Mercurial > hg > Members > tatsuki > Alice
view src/alice/test/codesegment/local/StartCodeSegment.java @ 190:a85ff8dc16c1 working
add Object data
author | one |
---|---|
date | Thu, 07 Mar 2013 21:27:00 +0900 |
parents | 52a1fa5ba38b |
children | caee170e6cfa |
line wrap: on
line source
package alice.test.codesegment.local; import java.util.Random; import alice.codesegment.CodeSegment; import alice.test.codesegment.local.bitonicsort.DataList; public class StartCodeSegment extends CodeSegment { public static long t = 0; @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. */ DataList list = new DataList(); int size = 10; for (int i = 0; i < size; i++){ Random rnd = new Random(); list.table.add(rnd.nextInt(100000)); } t = System.currentTimeMillis(); ods.put("key1", list); //ods.put("local", "key1", 1); //ods.put("local", "key1", 2); //ods.put("local", "key1", 3); new TestCodeSegment(); //System.out.println("create TestCodeSegment"); //ods.update("local", "key1", 0); } }