网络层
plugins/transport-nio
- Node 初始化 ActionModule,NetworkModule, ActionModule 初始化 RestController + ActionHandler , NetworkModule 初始化 NioHttpServerTransport NioTcpTransport 网络层lifecycle ,
- NioHttpServerTransport 注册es nio网络通道 处理器 HttpReadWriteHandler
- RestController 注册的patch 上的 RestHandler 处理rest请求
- NodeClient Map<Action, TransportAction> 处理返回response
action
1.请求超时处理 线程 线程池 执行ContextPreservingRunnable::run
- TimeoutHandler::run
public void run() {
if (responseHandlers.contains(requestId)) {
long timeoutTime = threadPool.relativeTimeInMillis();
timeoutInfoHandlers.put(requestId, new TimeoutInfoHolder(node, action, sentTime, timeoutTime));
// now that we have the information visible via timeoutInfoHandlers, we try to remove the request id
final Transport.ResponseContext holder = respons