view src/main/java/christie/test/TestCodeGear.java @ 7:21372a589bd3

add CodeGearExecutor
author Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp>
date Wed, 27 Dec 2017 18:42:46 +0900
parents 3dcfe63d6394
children 4b608ce0c483
line wrap: on
line source

package christie.test;

import christie.annotation.Peek;
import christie.annotation.Take;
import christie.codegear.CodeGear;
import christie.codegear.CodeGearManager;
import christie.datagear.DataGear;

import java.util.HashMap;


/**
 * Created by e125769 on 12/7/17.
 */
public class TestCodeGear extends CodeGear {

    @Take("hoge")
    public DataGear hoge = new DataGear<String>();

    @Take("huga")
    public DataGear huga = new DataGear<int[][]>();

    @Peek("piyo")
    public DataGear piyo = new DataGear<HashMap<String, Integer>>();

    public void run(CodeGearManager cgm){
        System.out.println("in run!");

        System.out.println(hoge.getData());
        System.out.println(huga.getData());
        System.out.println(piyo.getData());

        localDGM.put("hoge", "hoge2");//Queueにしないといけない
        //dgm("remote").put("hoge", "hoge3");
    }

}