tomcat源码之connector配置
Posted 人在江湖之诗和远方
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tomcat源码之connector配置相关的知识,希望对你有一定的参考价值。
连接
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配置的主要内容,如果未能解决你的问题,请参考以下文章