public class ConnectionPoolConfigurationBuilder extends AbstractConfigurationChildBuilder implements Builder<ConnectionPoolConfiguration>
Modifier and Type | Method and Description |
---|---|
ConnectionPoolConfiguration |
create()
Create the configuration bean
|
ConnectionPoolConfigurationBuilder |
exhaustedAction(ExhaustedAction exhaustedAction)
Specifies what happens when asking for a connection from a server's pool, and that pool is
exhausted.
|
ConnectionPoolConfigurationBuilder |
maxActive(int maxActive)
Controls the maximum number of connections per server that are allocated (checked out to
client threads, or idle in the pool) at one time.
|
ConnectionPoolConfigurationBuilder |
maxPendingRequests(int maxPendingRequests)
Specifies maximum number of requests sent over single connection at one instant.
|
ConnectionPoolConfigurationBuilder |
maxWait(long maxWait)
The amount of time in milliseconds to wait for a connection to become available when the
exhausted action is
ExhaustedAction.WAIT , after which a NoSuchElementException
will be thrown. |
ConnectionPoolConfigurationBuilder |
minEvictableIdleTime(long minEvictableIdleTime)
Specifies the minimum amount of time that an connection may sit idle in the pool before it is
eligible for eviction due to idle time.
|
ConnectionPoolConfigurationBuilder |
minIdle(int minIdle)
Sets a target value for the minimum number of idle connections (per server) that should always
be available.
|
ConnectionPoolConfigurationBuilder |
read(ConnectionPoolConfiguration template)
Reads the configuration from an already created configuration bean into this builder.
|
void |
validate()
Validate the data in this builder before building the configuration bean
|
ConnectionPoolConfigurationBuilder |
withPoolProperties(Properties properties)
Configures the connection pool parameter according to properties
|
addCluster, addContextInitializer, addContextInitializer, addContextInitializers, addJavaSerialWhiteList, addServer, addServers, asyncExecutorFactory, balancingStrategy, balancingStrategy, balancingStrategy, balancingStrategy, batchSize, build, classLoader, clientIntelligence, connectionPool, connectionTimeout, consistentHashImpl, consistentHashImpl, forceReturnValues, keySizeEstimate, marshaller, marshaller, marshaller, maxRetries, protocolVersion, remoteCache, security, socketTimeout, statistics, tcpKeepAlive, tcpNoDelay, transaction, uri, uri, valueSizeEstimate, version, withProperties
public ConnectionPoolConfigurationBuilder exhaustedAction(ExhaustedAction exhaustedAction)
public ConnectionPoolConfigurationBuilder maxActive(int maxActive)
public ConnectionPoolConfigurationBuilder maxWait(long maxWait)
ExhaustedAction.WAIT
, after which a NoSuchElementException
will be thrown. If a negative value is supplied, the pool will block indefinitely.public ConnectionPoolConfigurationBuilder minIdle(int minIdle)
public ConnectionPoolConfigurationBuilder minEvictableIdleTime(long minEvictableIdleTime)
public ConnectionPoolConfigurationBuilder maxPendingRequests(int maxPendingRequests)
exhausted action
is set to ExhaustedAction.WAIT
the pool will allow sending the request over one of the over-utilized
connections.
The rule of thumb is that this should be set to higher values if the values are small (< 1kB) and to lower values
if the entries are big (> 10kB).
Default setting for this parameter is 5.public ConnectionPoolConfigurationBuilder withPoolProperties(Properties properties)
public void validate()
Builder
validate
in interface Builder<ConnectionPoolConfiguration>
public ConnectionPoolConfiguration create()
Builder
create
in interface Builder<ConnectionPoolConfiguration>
public ConnectionPoolConfigurationBuilder read(ConnectionPoolConfiguration template)
Builder
read
in interface Builder<ConnectionPoolConfiguration>
template
- the configuration from which to "clone" this config if needed.Copyright © 2021 JBoss by Red Hat. All rights reserved.