Class ConnectionPoolConfigurationBuilder
- java.lang.Object
-
- org.infinispan.configuration.cache.AbstractPersistenceConfigurationChildBuilder
-
- org.infinispan.configuration.cache.AbstractStoreConfigurationChildBuilder<S>
-
- org.infinispan.persistence.remote.configuration.AbstractRemoteStoreConfigurationChildBuilder<RemoteStoreConfigurationBuilder>
-
- org.infinispan.persistence.remote.configuration.ConnectionPoolConfigurationBuilder
-
- All Implemented Interfaces:
org.infinispan.commons.configuration.Builder<ConnectionPoolConfiguration>
,ConfigurationChildBuilder
,PersistenceConfigurationChildBuilder
,StoreConfigurationChildBuilder<RemoteStoreConfigurationBuilder>
,RemoteStoreConfigurationChildBuilder<RemoteStoreConfigurationBuilder>
public class ConnectionPoolConfigurationBuilder extends AbstractRemoteStoreConfigurationChildBuilder<RemoteStoreConfigurationBuilder> implements org.infinispan.commons.configuration.Builder<ConnectionPoolConfiguration>
ConnectionPoolConfigurationBuilder. Specifies connection pooling properties for the HotRod client.- Since:
- 5.2
- Author:
- Tristan Tarrant
-
-
Field Summary
-
Fields inherited from class org.infinispan.persistence.remote.configuration.AbstractRemoteStoreConfigurationChildBuilder
attributes, builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Configuration
build()
ClusteringConfigurationBuilder
clustering()
CompatibilityModeConfigurationBuilder
compatibility()
Deprecated.ConnectionPoolConfiguration
create()
Create the configuration beanCustomInterceptorsConfigurationBuilder
customInterceptors()
DataContainerConfigurationBuilder
dataContainer()
DeadlockDetectionConfigurationBuilder
deadlockDetection()
EncodingConfigurationBuilder
encoding()
EvictionConfigurationBuilder
eviction()
ConnectionPoolConfigurationBuilder
exhaustedAction(ExhaustedAction exhaustedAction)
Specifies what happens when asking for a connection from a server's pool, and that pool is exhausted.ExpirationConfigurationBuilder
expiration()
protected ConfigurationBuilder
getBuilder()
IndexingConfigurationBuilder
indexing()
InvocationBatchingConfigurationBuilder
invocationBatching()
JMXStatisticsConfigurationBuilder
jmxStatistics()
LockingConfigurationBuilder
locking()
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
maxIdle(int maxIdle)
Controls the maximum number of idle persistent connections, per server, at any time.ConnectionPoolConfigurationBuilder
maxTotal(int maxTotal)
Sets a global limit on the number persistent connections that can be in circulation within the combined set of servers.MemoryConfigurationBuilder
memory()
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.PersistenceConfigurationBuilder
persistence()
ConnectionPoolConfigurationBuilder
read(ConnectionPoolConfiguration template)
Reads the configuration from an already created configuration bean into this builder.SecurityConfigurationBuilder
security()
boolean
simpleCache()
ConfigurationChildBuilder
simpleCache(boolean simpleCache)
SitesConfigurationBuilder
sites()
StoreAsBinaryConfigurationBuilder
storeAsBinary()
Deprecated.ConfigurationChildBuilder
template(boolean template)
ConnectionPoolConfigurationBuilder
testWhileIdle(boolean testWhileIdle)
Indicates whether or not idle connections should be validated by sending an TCP packet to the server, during idle connection eviction runs.ConnectionPoolConfigurationBuilder
timeBetweenEvictionRuns(long timeBetweenEvictionRuns)
Indicates how long the eviction thread should sleep before "runs" of examining idle connections.TransactionConfigurationBuilder
transaction()
UnsafeConfigurationBuilder
unsafe()
void
validate()
Validate the data in this builder before building the configuration beanvoid
validate(GlobalConfiguration globalConfig)
VersioningConfigurationBuilder
versioning()
-
Methods inherited from class org.infinispan.persistence.remote.configuration.AbstractRemoteStoreConfigurationChildBuilder
addServer, asyncExecutorFactory, balancingStrategy, connectionPool, connectionTimeout, forceReturnValues, getRemoteStoreBuilder, hotRodWrapping, keySizeEstimate, marshaller, marshaller, protocolVersion, protocolVersion, rawValues, remoteCacheName, remoteSecurity, socketTimeout, tcpNoDelay, transportFactory, transportFactory, valueSizeEstimate
-
Methods inherited from class org.infinispan.configuration.cache.AbstractStoreConfigurationChildBuilder
addProperty, async, fetchPersistentState, ignoreModifications, maxBatchSize, preload, purgeOnStartup, segmented, shared, singleton, transactional, withProperties
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.configuration.cache.ConfigurationChildBuilder
build, clustering, compatibility, customInterceptors, dataContainer, deadlockDetection, encoding, eviction, expiration, indexing, invocationBatching, jmxStatistics, locking, memory, security, simpleCache, simpleCache, sites, storeAsBinary, template, transaction, unsafe, versioning
-
Methods inherited from interface org.infinispan.configuration.cache.PersistenceConfigurationChildBuilder
persistence
-
Methods inherited from interface org.infinispan.configuration.cache.StoreConfigurationChildBuilder
addProperty, async, fetchPersistentState, ignoreModifications, maxBatchSize, preload, purgeOnStartup, segmented, shared, singleton, transactional, withProperties
-
-
-
-
Method Detail
-
exhaustedAction
public ConnectionPoolConfigurationBuilder exhaustedAction(ExhaustedAction exhaustedAction)
Specifies what happens when asking for a connection from a server's pool, and that pool is exhausted.
-
maxActive
public 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. When non-positive, there is no limit to the number of connections per server. When maxActive is reached, the connection pool for that server is said to be exhausted. The default setting for this parameter is -1, i.e. there is no limit.
-
maxTotal
public ConnectionPoolConfigurationBuilder maxTotal(int maxTotal)
Sets a global limit on the number persistent connections that can be in circulation within the combined set of servers. When non-positive, there is no limit to the total number of persistent connections in circulation. When maxTotal is exceeded, all connections pools are exhausted. The default setting for this parameter is -1 (no limit).
-
maxIdle
public ConnectionPoolConfigurationBuilder maxIdle(int maxIdle)
Controls the maximum number of idle persistent connections, per server, at any time. When negative, there is no limit to the number of connections that may be idle per server. The default setting for this parameter is -1.
-
minIdle
public ConnectionPoolConfigurationBuilder minIdle(int minIdle)
Sets a target value for the minimum number of idle connections (per server) that should always be available. If this parameter is set to a positive number and timeBetweenEvictionRunsMillis > 0, each time the idle connection eviction thread runs, it will try to create enough idle instances so that there will be minIdle idle instances available for each server. The default setting for this parameter is 1.
-
timeBetweenEvictionRuns
public ConnectionPoolConfigurationBuilder timeBetweenEvictionRuns(long timeBetweenEvictionRuns)
Indicates how long the eviction thread should sleep before "runs" of examining idle connections. When non-positive, no eviction thread will be launched. The default setting for this parameter is 2 minutes.
-
minEvictableIdleTime
public 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. When non-positive, no connection will be dropped from the pool due to idle time alone. This setting has no effect unless timeBetweenEvictionRunsMillis > 0. The default setting for this parameter is 1800000(30 minutes).
-
testWhileIdle
public ConnectionPoolConfigurationBuilder testWhileIdle(boolean testWhileIdle)
Indicates whether or not idle connections should be validated by sending an TCP packet to the server, during idle connection eviction runs. Connections that fail to validate will be dropped from the pool. This setting has no effect unless timeBetweenEvictionRunsMillis > 0. The default setting for this parameter is true.
-
validate
public void validate()
Description copied from interface:org.infinispan.commons.configuration.Builder
Validate the data in this builder before building the configuration bean- Specified by:
validate
in interfaceorg.infinispan.commons.configuration.Builder<ConnectionPoolConfiguration>
-
validate
public void validate(GlobalConfiguration globalConfig)
- Specified by:
validate
in interfaceConfigurationChildBuilder
- Overrides:
validate
in classAbstractRemoteStoreConfigurationChildBuilder<RemoteStoreConfigurationBuilder>
-
create
public ConnectionPoolConfiguration create()
Description copied from interface:org.infinispan.commons.configuration.Builder
Create the configuration bean- Specified by:
create
in interfaceorg.infinispan.commons.configuration.Builder<ConnectionPoolConfiguration>
- Returns:
-
read
public ConnectionPoolConfigurationBuilder read(ConnectionPoolConfiguration template)
Description copied from interface:org.infinispan.commons.configuration.Builder
Reads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
read
in interfaceorg.infinispan.commons.configuration.Builder<ConnectionPoolConfiguration>
- Parameters:
template
- the configuration from which to "clone" this config if needed.
-
template
public ConfigurationChildBuilder template(boolean template)
- Specified by:
template
in interfaceConfigurationChildBuilder
-
simpleCache
public ConfigurationChildBuilder simpleCache(boolean simpleCache)
- Specified by:
simpleCache
in interfaceConfigurationChildBuilder
-
simpleCache
public boolean simpleCache()
- Specified by:
simpleCache
in interfaceConfigurationChildBuilder
-
clustering
public ClusteringConfigurationBuilder clustering()
- Specified by:
clustering
in interfaceConfigurationChildBuilder
-
customInterceptors
public CustomInterceptorsConfigurationBuilder customInterceptors()
- Specified by:
customInterceptors
in interfaceConfigurationChildBuilder
-
dataContainer
public DataContainerConfigurationBuilder dataContainer()
- Specified by:
dataContainer
in interfaceConfigurationChildBuilder
-
deadlockDetection
public DeadlockDetectionConfigurationBuilder deadlockDetection()
- Specified by:
deadlockDetection
in interfaceConfigurationChildBuilder
-
encoding
public EncodingConfigurationBuilder encoding()
- Specified by:
encoding
in interfaceConfigurationChildBuilder
-
eviction
public EvictionConfigurationBuilder eviction()
- Specified by:
eviction
in interfaceConfigurationChildBuilder
-
expiration
public ExpirationConfigurationBuilder expiration()
- Specified by:
expiration
in interfaceConfigurationChildBuilder
-
indexing
public IndexingConfigurationBuilder indexing()
- Specified by:
indexing
in interfaceConfigurationChildBuilder
-
invocationBatching
public InvocationBatchingConfigurationBuilder invocationBatching()
- Specified by:
invocationBatching
in interfaceConfigurationChildBuilder
-
jmxStatistics
public JMXStatisticsConfigurationBuilder jmxStatistics()
- Specified by:
jmxStatistics
in interfaceConfigurationChildBuilder
-
persistence
public PersistenceConfigurationBuilder persistence()
- Specified by:
persistence
in interfaceConfigurationChildBuilder
-
locking
public LockingConfigurationBuilder locking()
- Specified by:
locking
in interfaceConfigurationChildBuilder
-
security
public SecurityConfigurationBuilder security()
- Specified by:
security
in interfaceConfigurationChildBuilder
-
storeAsBinary
@Deprecated public StoreAsBinaryConfigurationBuilder storeAsBinary()
Deprecated.- Specified by:
storeAsBinary
in interfaceConfigurationChildBuilder
-
transaction
public TransactionConfigurationBuilder transaction()
- Specified by:
transaction
in interfaceConfigurationChildBuilder
-
versioning
public VersioningConfigurationBuilder versioning()
- Specified by:
versioning
in interfaceConfigurationChildBuilder
-
unsafe
public UnsafeConfigurationBuilder unsafe()
- Specified by:
unsafe
in interfaceConfigurationChildBuilder
-
sites
public SitesConfigurationBuilder sites()
- Specified by:
sites
in interfaceConfigurationChildBuilder
-
compatibility
@Deprecated public CompatibilityModeConfigurationBuilder compatibility()
Deprecated.- Specified by:
compatibility
in interfaceConfigurationChildBuilder
-
memory
public MemoryConfigurationBuilder memory()
- Specified by:
memory
in interfaceConfigurationChildBuilder
-
getBuilder
protected ConfigurationBuilder getBuilder()
-
build
public Configuration build()
- Specified by:
build
in interfaceConfigurationChildBuilder
-
-