Mercurial > hg > RemoteEditor > Eclipse
changeset 91:0a483aa8cf71
SJIS to UTF-8
author | kent |
---|---|
date | Fri, 21 Dec 2007 17:49:22 +0900 |
parents | 0206b5e0fcd2 |
children | a21881284668 |
files | src/pathfinder/BlockingQ/EditorSimulator.java src/pathfinder/BlockingQ/SeMaSimulator.java src/pathfinder/BlockingQnoSeMa/EditorSimulator.java src/pathfinder/BlockingQnoSeMa/TestMerger.java src/pathfinder/EditorEmulator2.java src/pathfinder/SeMaEmulator.java src/pathfinder/TestMerger2.java |
diffstat | 7 files changed, 26 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pathfinder/BlockingQ/EditorSimulator.java Fri Dec 21 17:45:43 2007 +0900 +++ b/src/pathfinder/BlockingQ/EditorSimulator.java Fri Dec 21 17:49:22 2007 +0900 @@ -55,7 +55,7 @@ continue; } - //終了条件 + //邨ゆコ譚。莉カ if (checkQuit(cmd)){ System.out.println("\tEditor"+eid+" catch QUIT command emited by itself."); translater.transReceiveCmd(cmd); @@ -95,11 +95,11 @@ } private boolean checkQuit(REPCommand cmd) { - // 最初に全部のコマンドを送信するから、自分のQUITが来るのは最後 + // 譛蛻昴↓蜈ィ驛ィ縺ョ繧ウ繝槭Φ繝峨r騾∽ソ。縺吶k縺九i縲∬ェ蛻縺ョQUIT縺梧擂繧九ョ縺ッ譛蠕 return (cmd.eid==eid && cmd.cmd==REP.SMCMD_QUIT); } public pathfinder.Text getText(){ return text; } -} \ No newline at end of file +}
--- a/src/pathfinder/BlockingQ/SeMaSimulator.java Fri Dec 21 17:45:43 2007 +0900 +++ b/src/pathfinder/BlockingQ/SeMaSimulator.java Fri Dec 21 17:49:22 2007 +0900 @@ -53,7 +53,7 @@ int prev_i=i; while((packet=cs.poll())==null && running){ i = (i+1)%csList.size(); // i++ - cs = csList.get(i); // 次のChennelをゲット + cs = csList.get(i); // 谺。縺ョChennel繧偵ご繝繝 if(i==prev_i) try { ns.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } } @@ -61,9 +61,9 @@ System.out.println("SeMa pass packet to "+i+":>> "+packet.toString()); i = (i+1)%csList.size(); // i++ - cs = csList.get(i); // 次のChennelをゲット + cs = csList.get(i); // 谺。縺ョChennel繧偵ご繝繝 - // readできていたならそれを書き込む + // read縺ァ縺阪※縺縺溘↑繧峨◎繧後r譖ク縺崎セシ繧 try { cs.write(packet); } catch (InterruptedException e) { @@ -76,16 +76,16 @@ ChannelSimulator<P> cs = csList.get(i); while(running && MAX_PACKET==0 || count<MAX_PACKET){ - packet=cs.poll(); // [i]からread + packet=cs.poll(); // [i]縺九iread //if(packet!=null) System.out.println("SeMa catch packet to "+i+":>> "+packet.toString()); i = (i+1)%csList.size(); // i++ - cs = csList.get(i); // 次のChennelをゲット + cs = csList.get(i); // 谺。縺ョChennel繧偵ご繝繝 if (packet!=null) { System.out.println("SeMa pass packet to "+i+":>> "+packet.toString()); - cs.write(packet); // readできていたならそれを書き込む + cs.write(packet); // read縺ァ縺阪※縺縺溘↑繧峨◎繧後r譖ク縺崎セシ繧 count++; } - //if (i==0) checkAccept(); //全部回ったらaccept待ちをチェック + //if (i==0) checkAccept(); //蜈ィ驛ィ蝗槭▲縺溘iaccept蠕縺。繧偵メ繧ァ繝繧ッ } */ System.out.println("SessionManager finish.");
--- a/src/pathfinder/BlockingQnoSeMa/EditorSimulator.java Fri Dec 21 17:45:43 2007 +0900 +++ b/src/pathfinder/BlockingQnoSeMa/EditorSimulator.java Fri Dec 21 17:49:22 2007 +0900 @@ -44,7 +44,7 @@ while(running){ REPCommand cmd = cs.read(); - //終了条件 + //邨ゆコ譚。莉カ if (cmd.eid==eid && cmd.cmd==REP.SMCMD_QUIT){ System.out.println("\tEditor"+eid+" catch QUIT command emited by itself."); translater.transReceiveCmd(cmd); @@ -78,7 +78,7 @@ } /* private boolean checkQuit(REPCommand cmd) { - // 最初に全部のコマンドを送信するから、自分のQUITが来るのは最後 + // 譛蛻昴↓蜈ィ驛ィ縺ョ繧ウ繝槭Φ繝峨r騾∽ソ。縺吶k縺九i縲∬ェ蛻縺ョQUIT縺梧擂繧九ョ縺ッ譛蠕 return (cmd.eid==eid && cmd.cmd==REP.SMCMD_QUIT); } */
--- a/src/pathfinder/BlockingQnoSeMa/TestMerger.java Fri Dec 21 17:45:43 2007 +0900 +++ b/src/pathfinder/BlockingQnoSeMa/TestMerger.java Fri Dec 21 17:49:22 2007 +0900 @@ -53,7 +53,7 @@ for (int i=0; i<N_editor; i++){ int j=0; LinkedList<REPCommand> cmds = new LinkedList<REPCommand>(); - // 各エディタが送信するコマンド列を生成 + // 蜷繧ィ繝繧」繧ソ縺碁∽ソ。縺吶k繧ウ繝槭Φ繝牙励r逕滓 String str = "created by Editor"+i+":"+j; REPCommand cmd = new REPCommand(REP.REPCMD_INSERT, @@ -78,7 +78,7 @@ for (int i=0; i<N_editor; i++){ int j=0; LinkedList<REPCommand> cmds = new LinkedList<REPCommand>(); - //各エディタが送信するコマンド列を生成 + //蜷繧ィ繝繧」繧ソ縺碁∽ソ。縺吶k繧ウ繝槭Φ繝牙励r逕滓 String str = "Editor"+i+":"+j; REPCommand cmd = new REPCommand(REP.REPCMD_INSERT, 0, i, j++, @@ -94,7 +94,7 @@ private void test0cmd(){ for (int i=0; i<N_editor; i++){ LinkedList<REPCommand> cmds = new LinkedList<REPCommand>(); - //各エディタが送信するコマンド列を生成 + //蜷繧ィ繝繧」繧ソ縺碁∽ソ。縺吶k繧ウ繝槭Φ繝牙励r逕滓 EditorSimulator ee = new EditorSimulator(i, ns, cmds, "Editor"+i); if(i==0) ee.setOwner(true); editors.add(ee); @@ -130,7 +130,7 @@ LinkedList<REPCommand> cmds = new LinkedList<REPCommand>(); if(i==3||i==2||i==1){ - //各エディタが送信するコマンド列を生成 + //蜷繧ィ繝繧」繧ソ縺碁∽ソ。縺吶k繧ウ繝槭Φ繝牙励r逕滓 String str = "Editor"+i+":"+j; REPCommand cmd = new REPCommand(REP.REPCMD_INSERT, 0, i, j++, 10, str.length(), str); cmds.add( cmd);
--- a/src/pathfinder/EditorEmulator2.java Fri Dec 21 17:45:43 2007 +0900 +++ b/src/pathfinder/EditorEmulator2.java Fri Dec 21 17:49:22 2007 +0900 @@ -45,7 +45,7 @@ REPCommand cmd = cs.read(); if (cmd==null) continue; - //終了条件 + //邨ゆコ譚。莉カ if (checkQuit(cmd)){ System.out.println("\tEditor"+eid+" catch QUIT command emited by itself."); translater.transReceiveCmd(cmd); @@ -80,7 +80,7 @@ } private boolean checkQuit(REPCommand cmd) { - // 最初に全部のコマンドを送信するから、自分のQUITが来るのは最後 + // 譛蛻昴↓蜈ィ驛ィ縺ョ繧ウ繝槭Φ繝峨r騾∽ソ。縺吶k縺九i縲∬ェ蛻縺ョQUIT縺梧擂繧九ョ縺ッ譛蠕 return (cmd.eid==eid && cmd.cmd==REP.SMCMD_QUIT); }
--- a/src/pathfinder/SeMaEmulator.java Fri Dec 21 17:45:43 2007 +0900 +++ b/src/pathfinder/SeMaEmulator.java Fri Dec 21 17:49:22 2007 +0900 @@ -46,16 +46,16 @@ ChannelSimulator<P> cs = csList.get(i); while(running && MAX_PACKET==0 || count<MAX_PACKET){ - packet=cs.read(); // [i]からread + packet=cs.read(); // [i]縺九iread //if(packet!=null) System.out.println("SeMa catch packet to "+i+":>> "+packet.toString()); i = (i+1)%csList.size(); // i++ - cs = csList.get(i); // 次のChennelをゲット + cs = csList.get(i); // 谺。縺ョChennel繧偵ご繝繝 if (packet!=null) { System.out.println("SeMa pass packet to "+i+":>> "+packet.toString()); - cs.write(packet); // readできていたならそれを書き込む + cs.write(packet); // read縺ァ縺阪※縺縺溘↑繧峨◎繧後r譖ク縺崎セシ繧 count++; } - //if (i==0) checkAccept(); //全部回ったらaccept待ちをチェック + //if (i==0) checkAccept(); //蜈ィ驛ィ蝗槭▲縺溘iaccept蠕縺。繧偵メ繧ァ繝繧ッ } System.out.println("SessionManager finish."); }
--- a/src/pathfinder/TestMerger2.java Fri Dec 21 17:45:43 2007 +0900 +++ b/src/pathfinder/TestMerger2.java Fri Dec 21 17:49:22 2007 +0900 @@ -37,7 +37,7 @@ for (int i=0; i<N_editor; i++){ int j; LinkedList<REPCommand> cmds = new LinkedList<REPCommand>(); - // 各エディタが送信するコマンド列を生成 + // 蜷繧ィ繝繧」繧ソ縺碁∽ソ。縺吶k繧ウ繝槭Φ繝牙励r逕滓 for(j=0; j<N_packet; j++) { REPCommand cmd = new REPCommand(cmdNO[Verify.random(2)], 0, i, j, @@ -54,7 +54,7 @@ for (int i=0; i<N_editor; i++){ int j=0; LinkedList<REPCommand> cmds = new LinkedList<REPCommand>(); - // 各エディタが送信するコマンド列を生成 + // 蜷繧ィ繝繧」繧ソ縺碁∽ソ。縺吶k繧ウ繝槭Φ繝牙励r逕滓 String str = "created by Editor"+i+":"+j; REPCommand cmd = new REPCommand(REP.REPCMD_INSERT, @@ -80,7 +80,7 @@ for (int i=0; i<N_editor; i++){ int j=0; LinkedList<REPCommand> cmds = new LinkedList<REPCommand>(); - //各エディタが送信するコマンド列を生成 + //蜷繧ィ繝繧」繧ソ縺碁∽ソ。縺吶k繧ウ繝槭Φ繝牙励r逕滓 String str = "Editor"+i+":"+j; REPCommand cmd = new REPCommand(REP.REPCMD_INSERT, 0, i, j++, @@ -97,7 +97,7 @@ for (int i=0; i<N_editor; i++){ int j=0; LinkedList<REPCommand> cmds = new LinkedList<REPCommand>(); - //各エディタが送信するコマンド列を生成 + //蜷繧ィ繝繧」繧ソ縺碁∽ソ。縺吶k繧ウ繝槭Φ繝牙励r逕滓 EditorEmulator2 ee = new EditorEmulator2(i, ns, cmds, "Editor"+i); if(i==0) ee.setOwner(true); editors.add(ee);