本文整理了Java中io.airlift.http.client.HttpClient.getMaxContentLength()
方法的一些代码示例,展示了HttpClient.getMaxContentLength()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpClient.getMaxContentLength()
方法的具体详情如下:
包路径:io.airlift.http.client.HttpClient
类名称:HttpClient
方法名:getMaxContentLength
暂无
代码示例来源:origin: prestodb/presto
long maxResponseSizeBytes = (long) (Math.min(httpClient.getMaxContentLength(), maxResponseSize.toBytes()) * 0.75);
this.maxResponseSize = new DataSize(maxResponseSizeBytes, BYTE);
代码示例来源:origin: uk.co.nichesolutions.presto/presto-main
public ExchangeClientFactory(
BlockEncodingSerde blockEncodingSerde,
DataSize maxBufferedBytes,
DataSize maxResponseSize,
int concurrentRequestMultiplier,
Duration minErrorDuration,
HttpClient httpClient,
ScheduledExecutorService executor)
{
this.blockEncodingSerde = blockEncodingSerde;
this.maxBufferedBytes = requireNonNull(maxBufferedBytes, "maxBufferedBytes is null");
this.concurrentRequestMultiplier = concurrentRequestMultiplier;
this.minErrorDuration = requireNonNull(minErrorDuration, "minErrorDuration is null");
this.httpClient = requireNonNull(httpClient, "httpClient is null");
// Use only 0.75 of the maxResponseSize to leave room for additional bytes from the encoding
// TODO figure out a better way to compute the size of data that will be transferred over the network
requireNonNull(maxResponseSize, "maxResponseSize is null");
long maxResponseSizeBytes = (long) (Math.min(httpClient.getMaxContentLength(), maxResponseSize.toBytes()) * 0.75);
this.maxResponseSize = new DataSize(maxResponseSizeBytes, BYTE);
this.executor = requireNonNull(executor, "executor is null");
checkArgument(maxBufferedBytes.toBytes() > 0, "maxBufferSize must be at least 1 byte: %s", maxBufferedBytes);
checkArgument(maxResponseSize.toBytes() > 0, "maxResponseSize must be at least 1 byte: %s", maxResponseSize);
checkArgument(concurrentRequestMultiplier > 0, "concurrentRequestMultiplier must be at least 1: %s", concurrentRequestMultiplier);
}
代码示例来源:origin: io.prestosql/presto-main
long maxResponseSizeBytes = (long) (Math.min(httpClient.getMaxContentLength(), maxResponseSize.toBytes()) * 0.75);
this.maxResponseSize = new DataSize(maxResponseSizeBytes, BYTE);
代码示例来源:origin: prestosql/presto
long maxResponseSizeBytes = (long) (Math.min(httpClient.getMaxContentLength(), maxResponseSize.toBytes()) * 0.75);
this.maxResponseSize = new DataSize(maxResponseSizeBytes, BYTE);
内容来源于网络,如有侵权,请联系作者删除!