Mercurial > hg > RemoteEditor > REPSessionManager
diff rep/translater/TranslaterImp1.java @ 316:77f443f6dc9f
add session manager channel handler
author | kono |
---|---|
date | Tue, 07 Oct 2008 18:15:33 +0900 |
parents | 20fb70068089 |
children | c83a3faec487 |
line wrap: on
line diff
--- a/rep/translater/TranslaterImp1.java Mon Oct 06 18:58:49 2008 +0900 +++ b/rep/translater/TranslaterImp1.java Tue Oct 07 18:15:33 2008 +0900 @@ -7,12 +7,12 @@ import java.util.TreeSet; import rep.Editor; +import rep.Forwarder; import rep.REPCommand; import rep.REP; public class TranslaterImp1 implements Translater{ public int eid; - private int seq; /* * queue が5つもいるって、あまりに馬鹿げてる。 */ @@ -49,7 +49,9 @@ return cmd; } /** - * My command is returned from the session ring. + * My command is returned from the session ring. At this + * stage writeQueue is empty, our editor is waiting for me. + * Start merge process. * @param cmd */ public boolean catchOwnCommand(Editor editor){ @@ -140,7 +142,7 @@ * @param cmd the command to be translated. * @return translated commannd. */ - public void transReceiveCmd(Editor nextEditor,REPCommand cmd){ + public void transReceiveCmd(Forwarder nextEditor,REPCommand cmd){ assert (cmd.eid != eid); // nop command の挿入は Editor 側で行って、こちら側ではやらない unMergedCmds.push(cmd);