/** * Sets the idle timeout (seconds) for connections in the underlying {@link ConnectionPool}. * @param idleTimeout idle timeout (seconds) */ public synchronized void setIdleTimeout(int idleTimeout) { this.idleTimeout = idleTimeout; if (pool != null) pool.setParameters(pool.getMinPool(), pool.getMaxPool(), pool.getMaxSize(), this.idleTimeout * 1000L); }
/** * Sets the minimum number of pooled connections in the underlying {@link ConnectionPool}. * @param minPool minimum number of pooled connections */ public synchronized void setMinPool(int minPool) { this.minPool = minPool; if (pool != null) pool.setParameters(this.minPool, pool.getMaxPool(), pool.getMaxSize(), pool.getIdleTimeout()); }
/** * Sets the maximum number of connections in the underlying {@link ConnectionPool}. * @param maxSize maximum number of connections */ public synchronized void setMaxSize(int maxSize) { this.maxSize = maxSize; if (pool != null) pool.setParameters(pool.getMinPool(), pool.getMaxPool(), this.maxSize, pool.getIdleTimeout()); }
/** * Sets the maximum number of pooled connections in the underlying {@link ConnectionPool}. * @param maxPool maximum number of pooled connections */ public synchronized void setMaxPool(int maxPool) { this.maxPool = maxPool; if (pool != null) pool.setParameters(pool.getMinPool(), this.maxPool, pool.getMaxSize(), pool.getIdleTimeout()); }