in src/main/java/org/apache/commons/pool3/PoolUtils.java [1395:1412]
public static <K, V, E extends Exception> TimerTask checkMinIdle(
final KeyedObjectPool<K, V, E> keyedPool, final K key,
final int minIdle, final long periodMillis)
throws IllegalArgumentException {
if (keyedPool == null) {
throw new IllegalArgumentException(MSG_NULL_KEYED_POOL);
}
if (key == null) {
throw new IllegalArgumentException(MSG_NULL_KEY);
}
if (minIdle < 0) {
throw new IllegalArgumentException(MSG_MIN_IDLE);
}
final TimerTask task = new KeyedObjectPoolMinIdleTimerTask<>(
keyedPool, key, minIdle);
getMinIdleTimer().schedule(task, 0L, periodMillis);
return task;
}