org.mortbay.jetty.Connector.setHeaderBufferSize()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(286)

本文整理了Java中org.mortbay.jetty.Connector.setHeaderBufferSize()方法的一些代码示例,展示了Connector.setHeaderBufferSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Connector.setHeaderBufferSize()方法的具体详情如下:
包路径:org.mortbay.jetty.Connector
类名称:Connector
方法名:setHeaderBufferSize

Connector.setHeaderBufferSize介绍

[英]Set the size of the buffer to be used for request and response headers. An idle connection will at most have one buffer of this size allocated.
[中]设置用于请求和响应头的缓冲区大小。空闲连接最多只能分配一个此大小的缓冲区。

代码示例

代码示例来源: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;
}

代码示例来源:origin: com.github.sakserv/hadoop-mini-clusters-hbase

connector.setHeaderBufferSize(8192);

代码示例来源:origin: org.sonatype.plexus/plexus-jetty6

result.setHeaderBufferSize( getHeaderBufferSize() );

代码示例来源:origin: org.sonatype.plexus/plexus-jetty6

result.setHeaderBufferSize( getHeaderBufferSize() );

代码示例来源:origin: datasalt/splout-db

server = new Server(config.getInt(QNodeProperties.PORT));
for (Connector connector : server.getConnectors()) {
 connector.setHeaderBufferSize(65535);

相关文章