Mercurial > hg > Database > Alice
view src/main/java/alice/topology/node/ReceiveCloseMessage.java @ 646:3c060de44c2e
debug toplogy test
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 31 Dec 2017 12:06:45 +0900 |
parents | 24e535123df7 |
children | 15eeb439830c 767d93626b88 3284428f525e |
line wrap: on
line source
package alice.topology.node; import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class ReceiveCloseMessage extends CodeSegment { private Receiver info; public ReceiveCloseMessage(CommandType type) { info = ids.create(type); info.setKey("_CLOSEMESSEAGE"); } @Override public void run() { if (info.type == CommandType.PEEK) { new PrepareToClose(); } else if (info.type == CommandType.TAKE){ new ReceiveCloseMessage(CommandType.PEEK); } } }