Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.loaders.remote.configuration
Class ConnectionPoolConfigurationBuilder

java.lang.Object
  extended by org.infinispan.configuration.cache.AbstractLoadersConfigurationChildBuilder
      extended by org.infinispan.configuration.cache.AbstractLoaderConfigurationChildBuilder<S>
          extended by org.infinispan.configuration.cache.AbstractStoreConfigurationChildBuilder<S>
              extended by org.infinispan.loaders.remote.configuration.AbstractRemoteCacheStoreConfigurationChildBuilder<RemoteCacheStoreConfigurationBuilder>
                  extended by org.infinispan.loaders.remote.configuration.ConnectionPoolConfigurationBuilder
All Implemented Interfaces:
Builder<ConnectionPoolConfiguration>, ConfigurationChildBuilder, LoaderConfigurationChildBuilder<RemoteCacheStoreConfigurationBuilder>, LoadersConfigurationChildBuilder, StoreConfigurationChildBuilder<RemoteCacheStoreConfigurationBuilder>, RemoteCacheStoreConfigurationChildBuilder<RemoteCacheStoreConfigurationBuilder>

public class ConnectionPoolConfigurationBuilder
extends AbstractRemoteCacheStoreConfigurationChildBuilder<RemoteCacheStoreConfigurationBuilder>
implements Builder<ConnectionPoolConfiguration>

ConnectionPoolConfigurationBuilder. Specified connection pooling properties for the HotRod client

Since:
5.2
Author:
Tristan Tarrant

Method Summary
 Configuration build()
           
 ClusteringConfigurationBuilder clustering()
           
 ConnectionPoolConfiguration create()
          Create the configuration bean
 CustomInterceptorsConfigurationBuilder customInterceptors()
           
 DataContainerConfigurationBuilder dataContainer()
           
 DeadlockDetectionConfigurationBuilder deadlockDetection()
           
 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()
           
 LoadersConfigurationBuilder loaders()
           
 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.
 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.
 SitesConfigurationBuilder sites()
           
 StoreAsBinaryConfigurationBuilder storeAsBinary()
           
 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 bean
 VersioningConfigurationBuilder versioning()
           
 
Methods inherited from class org.infinispan.loaders.remote.configuration.AbstractRemoteCacheStoreConfigurationChildBuilder
addServer, asyncExecutorFactory, balancingStrategy, connectionPool, connectionTimeout, entryWrapper, forceReturnValues, hotRodWrapping, keySizeEstimate, marshaller, marshaller, pingOnStartup, protocolVersion, rawValues, remoteCacheName, socketTimeout, tcpNoDelay, transportFactory, transportFactory, valueSizeEstimate
 
Methods inherited from class org.infinispan.configuration.cache.AbstractStoreConfigurationChildBuilder
async, fetchPersistentState, ignoreModifications, purgeOnStartup, purgerThreads, purgeSynchronously, singletonStore
 
Methods inherited from class org.infinispan.configuration.cache.AbstractLoaderConfigurationChildBuilder
addProperty, 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.StoreConfigurationChildBuilder
async, fetchPersistentState, ignoreModifications, purgeOnStartup, purgerThreads, purgeSynchronously, singletonStore
 
Methods inherited from interface org.infinispan.configuration.cache.LoaderConfigurationChildBuilder
addProperty, withProperties
 
Methods inherited from interface org.infinispan.configuration.cache.ConfigurationChildBuilder
build, clustering, customInterceptors, dataContainer, deadlockDetection, eviction, expiration, indexing, invocationBatching, jmxStatistics, loaders, locking, sites, storeAsBinary, transaction, unsafe, versioning
 
Methods inherited from interface org.infinispan.configuration.cache.LoadersConfigurationChildBuilder
loaders
 

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: Builder
Validate the data in this builder before building the configuration bean

Specified by:
validate in interface Builder<ConnectionPoolConfiguration>

create

public ConnectionPoolConfiguration create()
Description copied from interface: Builder
Create the configuration bean

Specified by:
create in interface Builder<ConnectionPoolConfiguration>
Returns:

read

public ConnectionPoolConfigurationBuilder read(ConnectionPoolConfiguration template)
Description copied from interface: 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 interface Builder<ConnectionPoolConfiguration>
Parameters:
template - the configuration from which to "clone" this config if needed.

clustering

public ClusteringConfigurationBuilder clustering()
Specified by:
clustering in interface ConfigurationChildBuilder

customInterceptors

public CustomInterceptorsConfigurationBuilder customInterceptors()
Specified by:
customInterceptors in interface ConfigurationChildBuilder

dataContainer

public DataContainerConfigurationBuilder dataContainer()
Specified by:
dataContainer in interface ConfigurationChildBuilder

deadlockDetection

public DeadlockDetectionConfigurationBuilder deadlockDetection()
Specified by:
deadlockDetection in interface ConfigurationChildBuilder

eviction

public EvictionConfigurationBuilder eviction()
Specified by:
eviction in interface ConfigurationChildBuilder

expiration

public ExpirationConfigurationBuilder expiration()
Specified by:
expiration in interface ConfigurationChildBuilder

indexing

public IndexingConfigurationBuilder indexing()
Specified by:
indexing in interface ConfigurationChildBuilder

invocationBatching

public InvocationBatchingConfigurationBuilder invocationBatching()
Specified by:
invocationBatching in interface ConfigurationChildBuilder

jmxStatistics

public JMXStatisticsConfigurationBuilder jmxStatistics()
Specified by:
jmxStatistics in interface ConfigurationChildBuilder

loaders

public LoadersConfigurationBuilder loaders()
Specified by:
loaders in interface ConfigurationChildBuilder

locking

public LockingConfigurationBuilder locking()
Specified by:
locking in interface ConfigurationChildBuilder

storeAsBinary

public StoreAsBinaryConfigurationBuilder storeAsBinary()
Specified by:
storeAsBinary in interface ConfigurationChildBuilder

transaction

public TransactionConfigurationBuilder transaction()
Specified by:
transaction in interface ConfigurationChildBuilder

versioning

public VersioningConfigurationBuilder versioning()
Specified by:
versioning in interface ConfigurationChildBuilder

unsafe

public UnsafeConfigurationBuilder unsafe()
Specified by:
unsafe in interface ConfigurationChildBuilder

sites

public SitesConfigurationBuilder sites()
Specified by:
sites in interface ConfigurationChildBuilder

getBuilder

protected ConfigurationBuilder getBuilder()

build

public Configuration build()
Specified by:
build in interface ConfigurationChildBuilder

Infinispan Distribution 5.2.6.Final-redhat-2

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.