Пример #1
0
 /** Update the {@link ExecutorService} instance. */
 /*package*/ synchronized void resizeThreadPool() {
   queue.setExecutors(
       (maximumThreads == 0
           ? Executors.newCachedThreadPool()
           : Executors.newFixedThreadPool(maximumThreads)));
 }
Пример #2
0
 /** Returns true if the SCM polling thread queue has too many jobs than it can handle. */
 public boolean isClogged() {
   return queue.isStarving(STARVATION_THRESHOLD);
 }
Пример #3
0
 /** Gets the snapshot of {@link Runner}s that are performing polling. */
 public List<Runner> getRunners() {
   return Util.filter(queue.getInProgress(), Runner.class);
 }
Пример #4
0
 public ExecutorService getExecutor() {
   return queue.getExecutors();
 }