view src/main/java/christie/topology/manager/TopologyFinish.java @ 168:c7300be0fff6

fix incomingHosts end message
author akahori
date Tue, 22 Jan 2019 16:00:29 +0900
parents 42f195de3152
children 6eb548c188e5
line wrap: on
line source

package christie.topology.manager;

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


public class TopologyFinish extends CodeGear {
    @Take
    String finish;

    @Peek
    TopologyManagerConfig topologyManagerConfig;

    @Take
    Long startTime;

    @Override
    protected void run(CodeGearManager cgm) {
        if (topologyManagerConfig.showTime) {
            System.out.println("TopologymanagerTime = " + (System.currentTimeMillis() - startTime));
        }


       for(String dgm : cgm.getDGMList().keySet()){
            getDGM(dgm).put("_CLOSEMESSEAGE", "_CLOSEMESSEAGE");
            getDGM(dgm).shutdown();
        }

        getLocalDGM().finish();

    }

}