功能:java
功能:循環處理接收客戶端請求, 並將接收到的SocketChannel放入SelectorThread的acceptedQueue中apache
功能:處理隊列submittedRequests
對應程序片斷:org.apache.zookeeper.server.PrepRequestProcessor.run(PrepRequestProcessor.java:134)
線程
功能:請求處理鏈2
對應程序片斷: org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:109)
code
功能:待完善server
功能:關閉超時的鏈接NIOServerCnxntoken
AcceptThread(接收鏈接請求SocketChannel)
-------> SelectorThread(從Socket讀取數據, 封裝成Request)
-------------> ProcessThread(處理Request) 隊列
持續完善中。。。get