Mercurial > hg > Database > Christie
comparison src/main/java/christie/test/RemoteTake/RemoteTakeTest.java @ 32:307ac87ddcf7
add TakeFrom annotation
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 15 Feb 2018 15:48:23 +0900 |
parents | e29900328fff |
children | e7bf1506810c |
comparison
equal
deleted
inserted
replaced
31:e29900328fff | 32:307ac87ddcf7 |
---|---|
1 package christie.test.RemoteTake; | 1 package christie.test.RemoteTake; |
2 | 2 |
3 import christie.annotation.Take; | 3 import christie.annotation.TakeFrom; |
4 import christie.codegear.CodeGear; | 4 import christie.codegear.CodeGear; |
5 import christie.codegear.CodeGearManager; | 5 import christie.codegear.CodeGearManager; |
6 import christie.datagear.dg.DataGear; | |
7 | 6 |
8 public class RemoteTakeTest extends CodeGear{ | 7 public class RemoteTakeTest extends CodeGear{ |
9 | 8 |
10 @Take("remote") | 9 @TakeFrom("remote") |
11 public int hoge; | 10 int count; |
12 | 11 |
13 @Take("remote") | 12 @TakeFrom("remote") |
14 public int cgmID; | 13 int cgmID; |
15 | 14 |
16 @Override | 15 @Override |
17 protected void run(CodeGearManager cgm) { | 16 protected void run(CodeGearManager cgm) { |
18 | 17 |
19 if (hoge <= 10){ | 18 if (count <= 10){ |
20 System.out.println(cgmID + " : " +hoge); | 19 System.out.println(cgmID + " : " + count); |
21 cgm.setup(new RemoteTakeTest()); | 20 cgm.setup(new RemoteTakeTest()); |
22 } | 21 } |
23 | 22 |
24 getLocalDGM().put("hoge", hoge + 1); | 23 getLocalDGM().put("count", count + 1); |
25 getLocalDGM().put("cgmID", cgm.cgmID); | 24 getLocalDGM().put("cgmID", cgm.cgmID); |
26 } | 25 } |
27 } | 26 } |