本文整理了Java中org.mortbay.jetty.Connector.setMaxIdleTime()
方法的一些代码示例,展示了Connector.setMaxIdleTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Connector.setMaxIdleTime()
方法的具体详情如下:
包路径:org.mortbay.jetty.Connector
类名称:Connector
方法名:setMaxIdleTime
暂无
代码示例来源:origin: org.apache.maven.plugins/maven-site-plugin
private Connector getDefaultConnector()
{
Connector connector = new SelectChannelConnector();
connector.setPort( port );
connector.setMaxIdleTime( MAX_IDLE_TIME );
return connector;
}
代码示例来源:origin: opoo/opoopress
/**
*
* @param host localhost, 127.0.0.1 or 0.0.0.0.
* @param port port
* @return jetty connector
*/
protected Connector createConnector(String host, int port){
Connector connector = new SelectChannelConnector();
if(host != null){
connector.setHost(host);
}
connector.setPort( port );
connector.setMaxIdleTime(MAX_IDLE_TIME);
return connector;
}
代码示例来源:origin: com.facebook.hadoop/hadoop-core
/**
* Create a required listener for the Jetty instance listening on the port
* provided. This wrapper and all subclasses must create at least one
* listener.
*/
protected Connector createBaseListener(Configuration conf)
throws IOException {
Connector ret;
if (conf.getBoolean("hadoop.http.bio", false)) {
SocketConnector conn = new SocketConnector();
conn.setAcceptQueueSize(4096);
conn.setResolveNames(false);
ret = conn;
} else {
SelectChannelConnector conn = new SelectChannelConnector();
conn.setAcceptQueueSize(128);
conn.setResolveNames(false);
conn.setUseDirectBuffers(false);
ret = conn;
}
ret.setLowResourceMaxIdleTime(10000);
ret.setHeaderBufferSize(conf.getInt("hadoop.http.header.buffer.size", 4096));
ret.setMaxIdleTime(conf.getInt("dfs.http.timeout", 200000));
return ret;
}
内容来源于网络,如有侵权,请联系作者删除!