Mercurial > hg > RemoteEditor > REPSessionManager
changeset 330:ddfc786811b9
*** empty log message ***
author | kono |
---|---|
date | Sun, 12 Oct 2008 04:23:57 +0900 |
parents | a2624f6f7d0d |
children | f9fa876d3539 |
files | Todo rep/Editor.java rep/SessionManager.java |
diffstat | 3 files changed, 23 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/Todo Sat Oct 11 22:25:02 2008 +0900 +++ b/Todo Sun Oct 12 04:23:57 2008 +0900 @@ -1,3 +1,15 @@ +Sat Oct 11 22:28:49 JST 2008 + +Todo: +Session Manager をまたがった接続のテスト (kono) + +Todo: +Optimizerを使った場合のテスト (kono) + +Todo: +manager.remove(editor) の動作のタイミング、 channel closeの扱い (kono) + + Fri Oct 10 15:24:42 JST 2008 sid は大域的にuniqueにする必要がある。UPDATEで新しくsessionを作ったことを 通知して、Masterが新しいsidを決定し、UPDATE_ACKで他のSessionManagerに知らせる(kono) @@ -6,6 +18,7 @@ Todo: translator にある5つのqueueが、Editor にもある。merge のアルゴリズムの 実装を見直す必要がある。(kono) + Done:Sat Oct 11 22:28:49 JST 2008 Todo: SessionManager の向うにあるeditorにREPCommandを送るコードがない。Editor 扱いしても良いが、Editor が複雑すぎるので、それは好ましくない。Editor に nextChannelを持たせるのが良いか? (kono) @@ -14,7 +27,7 @@ Todo: SessionManger のeditor がmerge 中のeditor commandをblockするのは良いが、 sessionManger コマンドをblockされるのは困る。(kono) - Done: + Done: Sat Oct 11 22:28:49 JST 2008 Wed Oct 1 20:58:51 JST 2008
--- a/rep/Editor.java Sat Oct 11 22:25:02 2008 +0900 +++ b/rep/Editor.java Sun Oct 12 04:23:57 2008 +0900 @@ -127,7 +127,15 @@ @Override public boolean manage(REPCommand receivedCommand) { - + + if (receivedCommand.eid!=REP.MERGE_EID.id && receivedCommand.eid!=eid ) { + if (manager.hasWaitingCommand(channel)) { + // We cannot do this operation before watingCommandQueue. + manager.addWaitingCommand(new PacketSet(channel, this, receivedCommand)); + return true; + } + } + switch(receivedCommand.cmd){ // Editor Command
--- a/rep/SessionManager.java Sat Oct 11 22:25:02 2008 +0900 +++ b/rep/SessionManager.java Sun Oct 12 04:23:57 2008 +0900 @@ -210,13 +210,6 @@ if (sessionManagerCommand(channel, receivedCommand)) return; Session s = getSession(receivedCommand.sid); Editor e = s.getEditor(channel); - // if(e==null) throw new IOException(); - if (receivedCommand.eid!=REP.MERGE_EID.id && receivedCommand.eid!=e.eid ) { - if (hasWaitingCommand(channel)) { - addWaitingCommand(new PacketSet(channel, e, receivedCommand)); - return; - } - } e.manage(receivedCommand); }