objectPool.setMaxActive(maxPoolSize); objectPool.setMaxWait(connectionTimeout); objectPool.setMaxIdle(connectionMaxIlde); objectPool.setMinIdle(connectionMinIlde); objectPool.setTestOnBorrow(testOnBorrow);
/** * 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(); }
/** * Sets the the current maximum number of idle transformer objects allowed in the pool * * @param maxIdleTransformers New maximum size to set */ public void setMaxIdleTransformers(int maxIdleTransformers) { transformerPool.setMaxIdle(maxIdleTransformers); }
/** * Sets the the current maximum number of idle transformer objects allowed in the pool * * @param maxIdleTransformers New maximum size to set */ public void setMaxIdleTransformers(int maxIdleTransformers) { transformerPool.setMaxIdle(maxIdleTransformers); }
private void setMaxIdle(int maxIdle) { _socketPool.setMaxIdle(maxIdle); }
/** * Sets the maximum number of connections that can remain idle in the * pool. * * @see #getMaxIdle() * @param maxIdle the new value for maxIdle */ public synchronized void setMaxIdle(int maxIdle) { this.maxIdle = maxIdle; if (connectionPool != null) { connectionPool.setMaxIdle(maxIdle); } }
/** * Sets the maximum number of connections that can remain idle in the * pool. * * @see #getMaxIdle() * @param maxIdle the new value for maxIdle */ public void setMaxIdle(int maxIdle) { this.maxIdle = maxIdle; if (sessionPool != null) { sessionPool.setMaxIdle(maxIdle); } }
/** * Sets the maximum number of connections that can remain idle in the * pool. * * @param maxIdle the new value for maxIdle * @see #getMaxIdle() */ public synchronized void setMaxIdle(int maxIdle) { this.maxIdle = maxIdle; if (connectionPool != null) { connectionPool.setMaxIdle(maxIdle); } }
private void setMaxIdle(int maxIdle) { _socketPool.setMaxIdle(maxIdle); }
private void setMaxIdle(int maxIdle) { _socketPool.setMaxIdle(maxIdle); }
/** * Sets the maximum number of connections that can remain idle in the * pool. * * @see #getMaxIdle() * @param maxIdle the new value for maxIdle */ public synchronized void setMaxIdle(int maxIdle) { this.maxIdle = maxIdle; if (connectionPool != null) { connectionPool.setMaxIdle(maxIdle); } }
/** * Sets the maximum number of connections that can remail idle in the * pool. * * @see #getMaxIdle() * @param maxIdle the new value for maxIdle */ public synchronized void setMaxIdle(int maxIdle) { this.maxIdle = maxIdle; if (connectionPool != null) { connectionPool.setMaxIdle(maxIdle); } }
public void setReadConnectionPoolMaxIdle(int max) { roPool.setMaxIdle(max); }
private void setMaxIdle(int maxIdle) { _socketPool.setMaxIdle(maxIdle); }
private void setMaxIdle(int maxIdle) { _socketPool.setMaxIdle(maxIdle); }
public void setQueryConnectionPoolMaxIdle(int max) { queryPool.setMaxIdle(max); }
public void setWriteConnectionPoolMaxIdle(int max) { rwPool.setMaxIdle(max); }
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>(); }
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); }
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; }