Java Code Examples for org.apache.coyote.http11.Http11NioProtocol#setMaxThreads()
The following examples show how to use
org.apache.coyote.http11.Http11NioProtocol#setMaxThreads() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WebServerConfiguration.java From youkefu with Apache License 2.0 | 5 votes |
public void customize(Connector connector) { Http11NioProtocol protocol = (Http11NioProtocol) connector.getProtocolHandler(); //设置最大连接数 protocol.setMaxConnections(maxthread!=null ? maxthread : 2000); //设置最大线程数 protocol.setMaxThreads(maxconnection!=null ? maxconnection: 2000); protocol.setConnectionTimeout(30000); }
Example 2
Source File: AlipayGatewayServerBootstrap.java From redis-distributed-lock with Apache License 2.0 | 5 votes |
@Override public void customize(Connector connector) { Http11NioProtocol protocol = (Http11NioProtocol) connector .getProtocolHandler(); // 设置最大连接数 protocol.setMaxConnections(2000); // 设置最大线程数 protocol.setMaxThreads(2000); protocol.setConnectionTimeout(30000); }
Example 3
Source File: Bootstrap.java From lite-tracer with Apache License 2.0 | 5 votes |
@Override public void customize(Connector connector) { Http11NioProtocol protocol = (Http11NioProtocol) connector .getProtocolHandler(); // 设置最大连接数 protocol.setMaxConnections(2000); // 设置最大线程数 protocol.setMaxThreads(2000); protocol.setConnectionTimeout(30000); }
Example 4
Source File: Bootstrap.java From lite-tracer with Apache License 2.0 | 5 votes |
@Override public void customize(Connector connector) { Http11NioProtocol protocol = (Http11NioProtocol) connector .getProtocolHandler(); // 设置最大连接数 protocol.setMaxConnections(2000); // 设置最大线程数 protocol.setMaxThreads(2000); protocol.setConnectionTimeout(30000); }
Example 5
Source File: Bootstrap.java From lite-tracer with Apache License 2.0 | 5 votes |
@Override public void customize(Connector connector) { Http11NioProtocol protocol = (Http11NioProtocol) connector .getProtocolHandler(); // 设置最大连接数 protocol.setMaxConnections(2000); // 设置最大线程数 protocol.setMaxThreads(2000); protocol.setConnectionTimeout(30000); }
Example 6
Source File: WebServerConfiguration.java From goods-seckill with Apache License 2.0 | 5 votes |
public void customize(Connector connector) { Http11NioProtocol protocol = (Http11NioProtocol) connector.getProtocolHandler(); // 设置最大连接数 protocol.setMaxConnections(2000); // 设置最大线程数 protocol.setMaxThreads(2000); protocol.setConnectionTimeout(30000); }