public static class HttpClientConfiguration.ConnectionPoolConfiguration extends java.lang.Object implements Toggleable
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
static int |
DEFAULT_MAXCONNECTIONS
The default max connections value.
|
static java.lang.String |
PREFIX
The prefix to use for configuration.
|
Constructor and Description |
---|
ConnectionPoolConfiguration() |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.time.Duration> |
getAcquireTimeout()
The time to wait to acquire a connection.
|
int |
getMaxConnections()
The maximum number of connections.
|
int |
getMaxPendingAcquires()
Maximum number of futures awaiting connection acquisition.
|
boolean |
isEnabled()
Whether connection pooling is enabled.
|
void |
setAcquireTimeout(java.time.Duration acquireTimeout)
Sets the timeout to wait for a connection.
|
void |
setEnabled(boolean enabled)
Sets whether connection pooling is enabled.
|
void |
setMaxConnections(int maxConnections)
Sets the maximum number of connections.
|
void |
setMaxPendingAcquires(int maxPendingAcquires)
Sets the max pending acquires.
|
public static final java.lang.String PREFIX
public static final boolean DEFAULT_ENABLED
public static final int DEFAULT_MAXCONNECTIONS
public boolean isEnabled()
isEnabled
in interface Toggleable
public void setEnabled(boolean enabled)
enabled
- True if it is enabledpublic int getMaxConnections()
public void setMaxConnections(int maxConnections)
maxConnections
- The countpublic int getMaxPendingAcquires()
public void setMaxPendingAcquires(int maxPendingAcquires)
maxPendingAcquires
- The max pending acquirespublic java.util.Optional<java.time.Duration> getAcquireTimeout()
public void setAcquireTimeout(@Nullable java.time.Duration acquireTimeout)
acquireTimeout
- The acquire timeout