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>, org.infinispan.configuration.cache.ConfigurationChildBuilder, org.infinispan.configuration.cache.PersistenceConfigurationChildBuilder, org.infinispan.configuration.cache.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
  • Method Details

    • attributes

      public org.infinispan.commons.configuration.attributes.AttributeSet attributes()
      Specified by:
      attributes in interface org.infinispan.commons.configuration.Builder<ConnectionPoolConfiguration>
    • 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

      @Deprecated public ConnectionPoolConfigurationBuilder maxTotal(int maxTotal)
      Deprecated.
      since 10.0. This method has no effect
      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

      @Deprecated public ConnectionPoolConfigurationBuilder maxIdle(int maxIdle)
      Deprecated.
      since 10.0. This method has no effect
      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.
    • maxWait

      public ConnectionPoolConfigurationBuilder maxWait(int 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. If a negative value is supplied, the pool will block indefinitely.
    • 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

      @Deprecated public ConnectionPoolConfigurationBuilder timeBetweenEvictionRuns(long timeBetweenEvictionRuns)
      Deprecated.
      since 10.0. This method has no effect
      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

      @Deprecated public ConnectionPoolConfigurationBuilder testWhileIdle(boolean testWhileIdle)
      Deprecated.
      since 10.0. This method has no effect
      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.
    • maxPendingRequests

      public ConnectionPoolConfigurationBuilder maxPendingRequests(int maxPendingRequests)
      Specifies maximum number of requests sent over single connection at one instant. Connections with more concurrent requests will be ignored in the pool when choosing available connection and the pool will try to create a new connection if all connections are utilized. Only if the new connection cannot be created and the 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.
    • validate

      public void validate(org.infinispan.configuration.global.GlobalConfiguration globalConfig)
      Specified by:
      validate in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
      Overrides:
      validate in class AbstractRemoteStoreConfigurationChildBuilder<RemoteStoreConfigurationBuilder>
    • create

      public ConnectionPoolConfiguration create()
      Specified by:
      create in interface org.infinispan.commons.configuration.Builder<ConnectionPoolConfiguration>
    • read

      public ConnectionPoolConfigurationBuilder read(ConnectionPoolConfiguration template, org.infinispan.commons.configuration.Combine combine)
      Specified by:
      read in interface org.infinispan.commons.configuration.Builder<ConnectionPoolConfiguration>
    • template

      public org.infinispan.configuration.cache.ConfigurationChildBuilder template(boolean arg0)
      Specified by:
      template in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • simpleCache

      public org.infinispan.configuration.cache.ConfigurationChildBuilder simpleCache(boolean arg0)
      Specified by:
      simpleCache in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • simpleCache

      public boolean simpleCache()
      Specified by:
      simpleCache in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • clustering

      public org.infinispan.configuration.cache.ClusteringConfigurationBuilder clustering()
      Specified by:
      clustering in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • customInterceptors

      @Deprecated public org.infinispan.configuration.cache.CustomInterceptorsConfigurationBuilder customInterceptors()
      Deprecated.
      Specified by:
      customInterceptors in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • encoding

      public org.infinispan.configuration.cache.EncodingConfigurationBuilder encoding()
      Specified by:
      encoding in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • expiration

      public org.infinispan.configuration.cache.ExpirationConfigurationBuilder expiration()
      Specified by:
      expiration in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • query

      public org.infinispan.configuration.cache.QueryConfigurationBuilder query()
      Specified by:
      query in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • indexing

      public org.infinispan.configuration.cache.IndexingConfigurationBuilder indexing()
      Specified by:
      indexing in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • invocationBatching

      public org.infinispan.configuration.cache.InvocationBatchingConfigurationBuilder invocationBatching()
      Specified by:
      invocationBatching in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • statistics

      public org.infinispan.configuration.cache.StatisticsConfigurationBuilder statistics()
      Specified by:
      statistics in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • persistence

      public org.infinispan.configuration.cache.PersistenceConfigurationBuilder persistence()
      Specified by:
      persistence in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • locking

      public org.infinispan.configuration.cache.LockingConfigurationBuilder locking()
      Specified by:
      locking in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • security

      public org.infinispan.configuration.cache.SecurityConfigurationBuilder security()
      Specified by:
      security in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • transaction

      public org.infinispan.configuration.cache.TransactionConfigurationBuilder transaction()
      Specified by:
      transaction in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • unsafe

      public org.infinispan.configuration.cache.UnsafeConfigurationBuilder unsafe()
      Specified by:
      unsafe in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • sites

      public org.infinispan.configuration.cache.SitesConfigurationBuilder sites()
      Specified by:
      sites in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • memory

      public org.infinispan.configuration.cache.MemoryConfigurationBuilder memory()
      Specified by:
      memory in interface org.infinispan.configuration.cache.ConfigurationChildBuilder
    • getBuilder

      protected org.infinispan.configuration.cache.ConfigurationBuilder getBuilder()
    • build

      public org.infinispan.configuration.cache.Configuration build()
      Specified by:
      build in interface org.infinispan.configuration.cache.ConfigurationChildBuilder