我在我的应用程序中使用了jetty 8,现在我要升级到jetty 9,但似乎连接器配置有点不同,就像在jetty 8中一样,我使用这些代码配置连接器
server = new Server();
server.setThreadPool(threadPool);
SelectChannelConnector connector = new SelectChannelConnector();
connector.setHost(host);
connector.setPort(port);
connector.setMaxIdleTime(60000);
connector.setStatsOn(false);
connector.setLowResourcesConnections(20000);
connector.setLowResourcesMaxIdleTime(5000);
server.setConnectors(new Connector[]
{
connector
});
现在我需要在码头9中使用相同的代码,但据我研究,我只能找到以下内容
server = new Server(threadPool);
HttpConfiguration http_config = new HttpConfiguration();
http_config.setSecureScheme("https");
http_config.setOutputBufferSize(32768);
ServerConnector connector = new ServerConnector(server,
new HttpConnectionFactory(http_config));
connector.setHost(host);
connector.setPort(port);
connector.setIdleTimeout(60000);
请有人告诉我setStatsOn,setLowResourcesConnections和setLowResourcesMaxIdleTime发生了什么?
谢谢!