protected void setConfig()

in src/main/java/org/apache/commons/pool3/impl/BaseGenericObjectPool.java [1252:1273]


    protected void setConfig(final BaseObjectPoolConfig<T> config) {
        setLifo(config.getLifo());
        setMaxWait(config.getMaxWaitDuration());
        setBlockWhenExhausted(config.getBlockWhenExhausted());
        setTestOnCreate(config.getTestOnCreate());
        setTestOnBorrow(config.getTestOnBorrow());
        setTestOnReturn(config.getTestOnReturn());
        setTestWhileIdle(config.getTestWhileIdle());
        setNumTestsPerEvictionRun(config.getNumTestsPerEvictionRun());
        setMinEvictableIdleDuration(config.getMinEvictableIdleDuration());
        setDurationBetweenEvictionRuns(config.getDurationBetweenEvictionRuns());
        setSoftMinEvictableIdleDuration(config.getSoftMinEvictableIdleDuration());
        final EvictionPolicy<T> policy = config.getEvictionPolicy();
        if (policy == null) {
            // Use the class name (pre-2.6.0 compatible)
            setEvictionPolicyClassName(config.getEvictionPolicyClassName());
        } else {
            // Otherwise, use the class (2.6.0 feature)
            setEvictionPolicy(policy);
        }
        setEvictorShutdownTimeout(config.getEvictorShutdownTimeoutDuration());
    }