/** * Set the minimum number of threads. * * @param minThreads minimum number of threads * @see #getMinThreads */ @Override public void setMinThreads(int minThreads) { _minThreads = minThreads; if (_minThreads > _maxThreads) _maxThreads = _minThreads; int threads = _threadsStarted.get(); if (isStarted() && threads < _minThreads) startThreads(_minThreads - threads); }
/** * Get the number of reserved threads. * * @return number of reserved threads or or -1 for heuristically determined * @see #setReservedThreads */ @ManagedAttribute("the number of reserved threads in the pool") public int getReservedThreads() { if (isStarted()) return getBean(ReservedThreadExecutor.class).getCapacity(); return _reservedThreads; }
/** Set the minimum number of threads. * Delegated to the named or anonymous Pool. * @see #getMinThreads * @param minThreads minimum number of threads */ public void setMinThreads(int minThreads) { _minThreads=minThreads; if (_minThreads>_maxThreads) _maxThreads=_minThreads; int threads=_threadsStarted.get(); while (isStarted() && threads<_minThreads) { startThread(threads); threads=_threadsStarted.get(); } }
/** * Set the minimum number of threads. * * @param minThreads minimum number of threads * @see #getMinThreads */ @Override public void setMinThreads(int minThreads) { _minThreads = minThreads; if (_minThreads > _maxThreads) _maxThreads = _minThreads; int threads = _threadsStarted.get(); if (isStarted() && threads < _minThreads) startThreads(_minThreads - threads); }
/** Set the minimum number of threads. * Delegated to the named or anonymous Pool. * @see #getMinThreads * @param minThreads minimum number of threads */ public void setMinThreads(int minThreads) { _minThreads=minThreads; if (_minThreads>_maxThreads) _maxThreads=_minThreads; int threads=_threadsStarted.get(); while (isStarted() && threads<_minThreads) { startThread(threads); threads=_threadsStarted.get(); } }
/** * Set the minimum number of threads. * Delegated to the named or anonymous Pool. * * @param minThreads minimum number of threads * @see #getMinThreads */ @Override public void setMinThreads(int minThreads) { _minThreads = minThreads; if (_minThreads > _maxThreads) _maxThreads = _minThreads; int threads = _threadsStarted.get(); if (isStarted() && threads < _minThreads) startThreads(_minThreads - threads); }
/** * Set the minimum number of threads. * Delegated to the named or anonymous Pool. * * @param minThreads minimum number of threads * @see #getMinThreads */ @Override public void setMinThreads(int minThreads) { _minThreads = minThreads; if (_minThreads > _maxThreads) _maxThreads = _minThreads; int threads = _threadsStarted.get(); if (isStarted() && threads < _minThreads) startThreads(_minThreads - threads); }
/** Set the minimum number of threads. * Delegated to the named or anonymous Pool. * @see #getMinThreads * @param minThreads minimum number of threads */ public void setMinThreads(int minThreads) { _minThreads=minThreads; if (_minThreads>_maxThreads) _maxThreads=_minThreads; int threads=_threadsStarted.get(); while (isStarted() && threads<_minThreads) { startThread(threads); threads=_threadsStarted.get(); } }
/** Set the minimum number of threads. * Delegated to the named or anonymous Pool. * @see #getMinThreads * @param minThreads minimum number of threads */ public void setMinThreads(int minThreads) { _minThreads=minThreads; if (_minThreads>_maxThreads) _maxThreads=_minThreads; int threads=_threadsStarted.get(); while (isStarted() && threads<_minThreads) { startThread(threads); threads=_threadsStarted.get(); } }
/** * Set the minimum number of threads. * Delegated to the named or anonymous Pool. * * @param minThreads minimum number of threads * @see #getMinThreads */ @Override public void setMinThreads(int minThreads) { _minThreads = minThreads; if (_minThreads > _maxThreads) _maxThreads = _minThreads; int threads = _threadsStarted.get(); if (isStarted() && threads < _minThreads) startThreads(_minThreads - threads); }
/** * Get the number of reserved threads. * * @return number of reserved threads or or -1 for heuristically determined * @see #setReservedThreads */ @ManagedAttribute("the number of reserved threads in the pool") public int getReservedThreads() { if (isStarted()) return getBean(ReservedThreadExecutor.class).getCapacity(); return _reservedThreads; }