diff rep/SessionManager.java @ 356:b18c24dcc5d2

Before chaning put/join scheme for ditributed select.
author kono
date Sat, 18 Oct 2008 19:01:40 +0900
parents 98607350f7d1
children 034acadc0cdc
line wrap: on
line diff
--- a/rep/SessionManager.java	Fri Oct 17 22:11:34 2008 +0900
+++ b/rep/SessionManager.java	Sat Oct 18 19:01:40 2008 +0900
@@ -50,7 +50,7 @@
 	private SessionManagerGUI gui;
 	private REPSelector<REPCommand> selector;
 	SessionManagerList smList;
-	List<Editor> editorList;
+	EditorList editorList;
 	// editorList は、sessionList に入っているeditorとは別なeditorのlistらしい。
 	// private String maxHost;
 	private List<PacketSet> waitingCommandInMerge;
@@ -111,7 +111,7 @@
 
 		sessionList = new LinkedList<Session>();
 		smList = new SessionManagerList();
-		editorList = new LinkedList<Editor>();
+		editorList = new EditorList();
 		waitingCommandInMerge = new LinkedList<PacketSet>();
 		
 
@@ -361,11 +361,10 @@
 			return;
 		}
 		if (editor.hasSession()) return;
-		//REPSocketChannel<REPCommand> channel = editor.getChannel();
+		if (editorList.waiting(editor)) return;
 
-		// System.out.println("SessionManager.session.hasOnwer="+session.hasOwner());
 		if(session.hasOwner()){
-			editor.setEID(session.newEid());
+			editor.setEID(editorList.newEid());
 			editor.setSID(sid);
 			session.addForwarder(editor);
 			REPCommand sendCommand = new REPCommand();