@Override public synchronized void poolParametersChanged(ConnectionPoolEvent evt) { synchronized(pool) { this.minPool = pool.getMinPool(); this.maxPool = pool.getMaxPool(); this.maxSize = pool.getMaxSize(); this.idleTimeout = (int)pool.getIdleTimeout(); } }
/** * 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()); }
info += pool.getIdleTimeout() == 0 ? "none" : pool.getIdleTimeout();