码迷,mamicode.com
首页 > 其他好文 > 详细

tomcat源码之connector配置

时间:2018-11-12 01:17:02      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:lse   tom   ceo   zab   分享   cte   else   ted   http   

连接

技术分享图片


 

acceptor

/**
* Acceptor thread count.
*/
protected int acceptorThreadCount = 0;

 

 

处理线程

技术分享图片

 

private int minSpareThreads = 10;
public int getMinSpareThreads() {
return Math.min(minSpareThreads,getMaxThreads());
}


protected int getMaxThreadsExecutor(boolean useExecutor) {
if (useExecutor && executor != null) {
if (executor instanceof java.util.concurrent.ThreadPoolExecutor) {
return ((java.util.concurrent.ThreadPoolExecutor)executor).getMaximumPoolSize();
} else if (executor instanceof ResizableExecutor) {
return ((ResizableExecutor)executor).getMaxThreads();
} else {
return -1;
}
} else {
return maxThreads;
}
}

 

tomcat源码之connector配置

标签:lse   tom   ceo   zab   分享   cte   else   ted   http   

原文地址:https://www.cnblogs.com/huilei/p/9944359.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!