Mercurial > hg > Database > Christie
view src/main/java/christie/topology/node/PrepareToClose.java @ 272:b592fe1d4a4e default tip
create example Attendance
author | matac42 <matac@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 01 Jul 2021 20:41:07 +0900 |
parents | 6eb548c188e5 |
children |
line wrap: on
line source
package christie.topology.node; import christie.annotation.Peek; import christie.annotation.Take; import christie.codegear.CodeGear; import christie.codegear.CodeGearManager; import christie.datagear.DataGearManager; import christie.topology.Message; import christie.topology.TopologyDataGear; import java.util.List; public class PrepareToClose extends CodeGear { @Take Message _CLOSEMESSEAGE; @Peek TopologyDataGear topoDG; public PrepareToClose() { } @Override protected void run(CodeGearManager cgm) { List<String> _CLIST = topoDG.getConnectionList(); for(String dgmName: _CLIST){ getDGM(dgmName).shutdown(); //_CLIST.remove(dgmName); } getLocalDGM().finish(); /*if (_CLIST.contains(_CLOSEMESSEAGE)) { _CLIST.remove(_CLOSEMESSEAGE); getDGM(_CLOSEMESSEAGE).setSendError(false); getDGM(_CLOSEMESSEAGE).close(); getDGM(_CLOSEMESSEAGE).put("_CLOSEREADY", _CLOSEMESSEAGE); getLocalDGM().put("_CLOSEREADY", _CLOSEMESSEAGE); cgm.setup(new CloseRemoteDataGear()); } cgm.setup(new PrepareToClose()); getLocalDGM().put("_CLIST", _CLIST);*/ } }