/** * Sets whether to use caching for {@link Statement} instances. * @param cache whether to cache {@code Statement} instances */ public void setCacheStatements(boolean cache) { // Release statements if required. if (cacheS && !cache) { try { flushSpareStatements(); } catch (SQLException sqlx) { log_warn(pool.getName() + ": " + sqlx.getMessage(), sqlx); } } this.cacheS = cache; }
flushSpareStatements(); flushOpenStatements();