congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
GenericObjectPool.setMaxActive
Code IndexAdd Tabnine to your IDE (free)

How to use
setMaxActive
method
in
org.apache.commons.pool.impl.GenericObjectPool

Best Java code snippets using org.apache.commons.pool.impl.GenericObjectPool.setMaxActive (Showing top 20 results out of 423)

origin: apache/flume

connectionPool.setMaxActive(maxActive);
origin: apache/hive

objectPool.setMaxActive(maxPoolSize);
objectPool.setMaxWait(connectionTimeout);
objectPool.setMaxIdle(connectionMaxIlde);
origin: banq/jdonframework

public void setMaxPoolSize(int maxPoolSize) {
  pool.setMaxActive(maxPoolSize);
}
origin: commons-pool/commons-pool

/**
 * Sets my configuration.
 *
 * @param conf configuration to use.
 * @see GenericObjectPool.Config
 */
public void setConfig(GenericObjectPool.Config conf) {
  synchronized (this) {
    setMaxIdle(conf.maxIdle);
    setMinIdle(conf.minIdle);
    setMaxActive(conf.maxActive);
    setMaxWait(conf.maxWait);
    setWhenExhaustedAction(conf.whenExhaustedAction);
    setTestOnBorrow(conf.testOnBorrow);
    setTestOnReturn(conf.testOnReturn);
    setTestWhileIdle(conf.testWhileIdle);
    setNumTestsPerEvictionRun(conf.numTestsPerEvictionRun);
    setMinEvictableIdleTimeMillis(conf.minEvictableIdleTimeMillis);
    setTimeBetweenEvictionRunsMillis(conf.timeBetweenEvictionRunsMillis);
    setSoftMinEvictableIdleTimeMillis(conf.softMinEvictableIdleTimeMillis);
    setLifo(conf.lifo);
  }
  allocate();
}
origin: org.mule.modules/mule-module-xml

/**
 * Sets the the current maximum number of active transformer objects allowed in the
 * pool
 *
 * @param maxActiveTransformers New maximum size to set
 */
public void setMaxActiveTransformers(int maxActiveTransformers)
{
  transformerPool.setMaxActive(maxActiveTransformers);
}
origin: org.mule.modules/mule-module-xml

/**
 * Sets the the current maximum number of active transformer objects allowed in the
 * pool
 *
 * @param maxActiveTransformers New maximum size to set
 */
public void setMaxActiveTransformers(int maxActiveTransformers)
{
  transformerPool.setMaxActive(maxActiveTransformers);
}
origin: org.apache.openjpa/openjpa-all

/**
 * Sets the maximum number of active connections that can be
 * allocated at the same time. Use a negative value for no limit.
 * 
 * @param maxActive the new value for maxActive
 * @see #getMaxActive()
 */
public synchronized void setMaxActive(int maxActive) {
  this.maxActive = maxActive;
  if (connectionPool != null) {
    connectionPool.setMaxActive(maxActive);
  }
}
origin: org.apache.commons/com.springsource.org.apache.commons.dbcp

/**
 * Sets the maximum number of active connections that can be
 * allocated at the same time.
 * 
 * @param maxActive the new value for maxActive
 * @see #getMaxActive()
 */
public synchronized void setMaxActive(int maxActive) {
  this.maxActive = maxActive;
  if (connectionPool != null) {
    connectionPool.setMaxActive(maxActive);
  }
}
origin: org.everit.osgi.bundles/org.everit.osgi.bundles.commons-dbcp

/**
 * Sets the maximum number of active connections that can be
 * allocated at the same time. Use a negative value for no limit.
 * 
 * @param maxActive the new value for maxActive
 * @see #getMaxActive()
 */
public synchronized void setMaxActive(int maxActive) {
  this.maxActive = maxActive;
  if (connectionPool != null) {
    connectionPool.setMaxActive(maxActive);
  }
}
origin: org.apache.openjpa/openjpa-all

private void setMaxActive(int maxActive) {
  _socketPool.setMaxActive(maxActive);
}
origin: org.apache.openjpa/openjpa-kernel

private void setMaxActive(int maxActive) {
  _socketPool.setMaxActive(maxActive);
}
origin: uk.org.mygrid.resources/boca-model

public void setWriteConnectionMaxPoolSize(int size) {
  rwPool.setMaxActive(size);
}
origin: org.apache.openjpa/com.springsource.org.apache.openjpa

private void setMaxActive(int maxActive) {
  _socketPool.setMaxActive(maxActive);
}
origin: org.idevlab/rjc

/**
 * Sets the maximum number of active connections that can be
 * allocated at the same time. Use a negative value for no limit.
 *
 * @param maxActive the new value for maxActive
 * @see #getMaxActive()
 */
public synchronized void setMaxActive(int maxActive) {
  this.maxActive = maxActive;
  if (connectionPool != null) {
    connectionPool.setMaxActive(maxActive);
  }
}
origin: org.mule.modules/mule-module-xml

public XsltTransformer()
{
  super();
  transformerPool = new GenericObjectPool(new PooledXsltTransformerFactory());
  transformerPool.setMinIdle(MIN_IDLE_TRANSFORMERS);
  transformerPool.setMaxIdle(MAX_IDLE_TRANSFORMERS);
  transformerPool.setMaxActive(MAX_ACTIVE_TRANSFORMERS);
  contextProperties = new HashMap<String, Object>();
}
origin: uk.org.mygrid.resources/boca-model

private void setupPool(GenericObjectPool pool, RepositoryConnectionFactory factory, int maxActive, int maxIdle, long blockWait) {
  pool.setFactory(factory);
  pool.setMaxActive(maxActive);
  pool.setMaxIdle(maxIdle);
  pool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_BLOCK);
  pool.setMaxWait(blockWait);
}
origin: org.eobjects.analyzerbeans/AnalyzerBeans-core

/**
 * Creates a connection pool that can be used for one or more
 * {@link PooledServiceSession} objects.
 * 
 * @param maxConnections
 * @return
 */
public static GenericObjectPool<Integer> createConnectionPool(int maxConnections) {
  GenericObjectPool<Integer> connectionPool = new GenericObjectPool<Integer>(new ConnectionPoolObjectFactory());
  connectionPool.setMaxActive(maxConnections);
  connectionPool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_BLOCK);
  return connectionPool;
}
origin: datacleaner/DataCleaner

/**
 * Creates a connection pool that can be used for one or more
 * {@link PooledServiceSession} objects.
 *
 * @param maxConnections
 * @return
 */
public static GenericObjectPool<Integer> createConnectionPool(final int maxConnections) {
  final GenericObjectPool<Integer> connectionPool = new GenericObjectPool<>(new ConnectionPoolObjectFactory());
  connectionPool.setMaxActive(maxConnections);
  connectionPool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_BLOCK);
  return connectionPool;
}
origin: org.mule.modules/mule-module-xml

private GenericObjectPool<XPathExpression> getXPathExpressionPool(String expression)
{
  GenericObjectPool genericPool = new GenericObjectPool(new XPathExpressionFactory(xpathFactory, expression, namespaceContext, this));
  genericPool.setMaxActive(MAX_ACTIVE_XPATH_EXPRESSIONS);
  genericPool.setMaxIdle(MAX_IDLE_XPATH_EXPRESSIONS);
  genericPool.setMinIdle(MIN_IDLE_XPATH_EXPRESSIONS);
  return genericPool;
}
origin: org.hobsoft.symmetry/symmetry-core

public DefaultComponentPool(PoolableObjectFactory objectFactory)
{
  pool = new GenericObjectPool(objectFactory);
  
  pool.setMinIdle(POOL_SIZE);
  pool.setMaxActive(POOL_SIZE);
  pool.setNumTestsPerEvictionRun(0);
  pool.setMinEvictableIdleTimeMillis(0);
  pool.setTimeBetweenEvictionRunsMillis(POOL_SPAWN_DELAY);
}
 
org.apache.commons.pool.implGenericObjectPoolsetMaxActive

Javadoc

Sets the cap on the number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time. Use a negative value for no limit.

Popular methods of GenericObjectPool

  • <init>
    Create a new GenericObjectPool using the specified values.
  • returnObject
    Returns an object instance to the pool. If #getMaxIdle() is set to a positive value and the number
  • borrowObject
    Borrows an object from the pool. If there is an idle instance available in the pool, then either th
  • close
    Closes the pool. Once the pool is closed, #borrowObject()will fail with IllegalStateException, but #
  • setMaxIdle
    Sets the cap on the number of "idle" instances in the pool. If maxIdle is set too low on heavily loa
  • setMinIdle
    Sets the minimum number of objects allowed in the pool before the evictor thread (if active) spawns
  • setTimeBetweenEvictionRunsMillis
    Sets the number of milliseconds to sleep between runs of the idle object evictor thread. When non-po
  • setMinEvictableIdleTimeMillis
    Sets the minimum amount of time an object may sit idle in the pool before it is eligible for evictio
  • setMaxWait
    Sets the maximum amount of time (in milliseconds) the #borrowObject method should block before throw
  • setTestOnBorrow
    When true, objects will be PoolableObjectFactory#validateObjectbefore being returned by the #borrowO
  • setWhenExhaustedAction
    Sets the action to take when the #borrowObject method is invoked when the pool is exhausted (the max
  • getNumActive
    Return the number of instances currently borrowed from this pool.
  • setWhenExhaustedAction,
  • getNumActive,
  • getNumIdle,
  • setTestWhileIdle,
  • setNumTestsPerEvictionRun,
  • setTestOnReturn,
  • invalidateObject,
  • clear,
  • addObject

Popular in Java

  • Updating database using SQL prepared statement
  • setScale (BigDecimal)
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
  • Kernel (java.awt.image)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Notification (javax.management)
  • Option (scala)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now