首页 > 其他 > 详细

tomcat源码之connector配置

时间:2018-11-12 01:09:21      阅读:197      评论:0      收藏:0      [点我收藏+]

连接

技术分享图片


 

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配置

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!