Mercurial > hg > Database > Alice
view src/main/java/alice/topology/node/ReceiveCloseMessage.java @ 599:3284428f525e dispose
add MetaCodeSegment & MetaDSM
author | Nozomi Teruya <e125769@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 15 Feb 2016 01:16:35 +0900 |
parents | 24e535123df7 |
children | 8a9fd716c335 |
line wrap: on
line source
package alice.topology.node; import alice.codesegment.CodeSegment; import alice.codesegment.MetaCodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; public class ReceiveCloseMessage extends MetaCodeSegment { 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); } } }