public static class ConnectionConfig.Builder extends Object
Modifier and Type | Method and Description |
---|---|
ConnectionConfig |
build() |
ConnectionConfig.Builder |
setConnectTimeout(long connectTimeout,
TimeUnit timeUnit) |
ConnectionConfig.Builder |
setConnectTimeout(org.apache.hc.core5.util.Timeout connectTimeout)
Determines the timeout until a new connection is fully established.
|
ConnectionConfig.Builder |
setSocketTimeout(int soTimeout,
TimeUnit timeUnit) |
ConnectionConfig.Builder |
setSocketTimeout(org.apache.hc.core5.util.Timeout soTimeout)
Determines the default socket timeout value for I/O operations.
|
ConnectionConfig.Builder |
setTimeToLive(long timeToLive,
TimeUnit timeUnit) |
ConnectionConfig.Builder |
setTimeToLive(org.apache.hc.core5.util.TimeValue timeToLive)
Defines the total span of time connections can be kept alive or execute requests.
|
ConnectionConfig.Builder |
setValidateAfterInactivity(long validateAfterInactivity,
TimeUnit timeUnit) |
ConnectionConfig.Builder |
setValidateAfterInactivity(org.apache.hc.core5.util.TimeValue validateAfterInactivity)
Defines period of inactivity after which persistent connections must
be re-validated prior to being leased to the consumer.
|
public ConnectionConfig.Builder setSocketTimeout(int soTimeout, TimeUnit timeUnit)
setSocketTimeout(Timeout)
public ConnectionConfig.Builder setSocketTimeout(org.apache.hc.core5.util.Timeout soTimeout)
Default: null
(undefined)
public ConnectionConfig.Builder setConnectTimeout(org.apache.hc.core5.util.Timeout connectTimeout)
A timeout value of zero is interpreted as an infinite timeout.
Default: 3 minutes
public ConnectionConfig.Builder setConnectTimeout(long connectTimeout, TimeUnit timeUnit)
setConnectTimeout(Timeout)
public ConnectionConfig.Builder setValidateAfterInactivity(org.apache.hc.core5.util.TimeValue validateAfterInactivity)
Default: null
(undefined)
public ConnectionConfig.Builder setValidateAfterInactivity(long validateAfterInactivity, TimeUnit timeUnit)
setValidateAfterInactivity(TimeValue)
public ConnectionConfig.Builder setTimeToLive(org.apache.hc.core5.util.TimeValue timeToLive)
Default: null
(undefined)
public ConnectionConfig.Builder setTimeToLive(long timeToLive, TimeUnit timeUnit)
setTimeToLive(TimeValue)
public ConnectionConfig build()
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.