public class ChannelPoolManagerKeyBuilder
extends java.lang.Object
ChannelPoolManagerKey with reasonable default configs.| Constructor and Description |
|---|
ChannelPoolManagerKeyBuilder() |
public ChannelPoolManagerKeyBuilder setSSLContext(javax.net.ssl.SSLContext sslContext)
sslContext - SSLContextpublic ChannelPoolManagerKeyBuilder setSSLParameters(javax.net.ssl.SSLParameters sslParameters)
sslParameters - SSLParameterswith overloaded constructpublic ChannelPoolManagerKeyBuilder setGracefulShutdownTimeout(int gracefulShutdownTimeout)
gracefulShutdownTimeout - Graceful shutdown timeout dictates the amount of time an HTTP/2 connection waits
for existing streams to complete before shutting down the connection, by either
connection error or intentional connection close.
The suggested value is about the request timeout because there is no point to wait
any further if the request has already timed out.
The default Netty value is 30s.public ChannelPoolManagerKeyBuilder setIdleTimeout(long idleTimeout)
idleTimeout - Interval after which idle connections will be automatically closedpublic ChannelPoolManagerKeyBuilder setSslIdleTimeout(long sslIdleTimeout)
sslIdleTimeout - Interval after which idle connections will be automatically closedpublic ChannelPoolManagerKeyBuilder setMaxHeaderSize(int maxHeaderSize)
maxHeaderSize - Maximum size of all HTTP headerspublic ChannelPoolManagerKeyBuilder setMaxChunkSize(int maxChunkSize)
maxChunkSize - Maximum size of a HTTP chunkpublic ChannelPoolManagerKeyBuilder setMaxResponseSize(long maxResponseSize)
maxResponseSize - Maximum size of a HTTP responsepublic ChannelPoolManagerKeyBuilder setMaxPoolSize(int maxPoolSize)
maxPoolSize - maximum size for each pool for each host. Http and Https have different poolspublic ChannelPoolManagerKeyBuilder setMinPoolSize(int minPoolSize)
minPoolSize - minimum size for each pool for each hostpublic ChannelPoolManagerKeyBuilder setMaxConcurrentConnectionInitializations(int maxConcurrentConnectionInitializations)
public ChannelPoolManagerKeyBuilder setPoolWaiterSize(int poolWaiterSize)
public ChannelPoolManagerKeyBuilder setStrategy(com.linkedin.r2.transport.http.client.AsyncPoolImpl.Strategy strategy)
strategy - The strategy used to return pool objectspublic ChannelPoolManagerKeyBuilder setPoolStatsNamePrefix(java.lang.String poolStatsNamePrefix)
poolStatsNamePrefix - The name prefix before the hash of propertiespublic ChannelPoolManagerKeyBuilder setTcpNoDelay(boolean tcpNoDelay)
tcpNoDelay - flag to enable/disable Nagle's algorithmpublic ChannelPoolManagerKey build()