Example usage for org.apache.commons.pool2.impl GenericObjectPoolConfig getBlockWhenExhausted

List of usage examples for org.apache.commons.pool2.impl GenericObjectPoolConfig getBlockWhenExhausted

Introduction

In this page you can find the example usage for org.apache.commons.pool2.impl GenericObjectPoolConfig getBlockWhenExhausted.

Prototype

public boolean getBlockWhenExhausted() 

Source Link

Document

Get the value for the blockWhenExhausted configuration attribute for pools created with this configuration instance.

Usage

From source file:JDBCPool.dbcp.demo.sourcecode.GenericObjectPool.java

/**
 * Sets the base pool configuration.//from w  w w.  j a v  a  2 s  .com
 *
 * @param conf the new configuration to use. This is used by value.
 *
 * @see GenericObjectPoolConfig
 */
public void setConfig(GenericObjectPoolConfig conf) {
    setLifo(conf.getLifo());
    setMaxIdle(conf.getMaxIdle());
    setMinIdle(conf.getMinIdle());
    setMaxTotal(conf.getMaxTotal());
    setMaxWaitMillis(conf.getMaxWaitMillis());
    setBlockWhenExhausted(conf.getBlockWhenExhausted());
    setTestOnCreate(conf.getTestOnCreate());
    setTestOnBorrow(conf.getTestOnBorrow());
    setTestOnReturn(conf.getTestOnReturn());
    setTestWhileIdle(conf.getTestWhileIdle());
    setNumTestsPerEvictionRun(conf.getNumTestsPerEvictionRun());
    setMinEvictableIdleTimeMillis(conf.getMinEvictableIdleTimeMillis());
    setTimeBetweenEvictionRunsMillis(conf.getTimeBetweenEvictionRunsMillis());
    setSoftMinEvictableIdleTimeMillis(conf.getSoftMinEvictableIdleTimeMillis());
    setEvictionPolicyClassName(conf.getEvictionPolicyClassName());
}