Ejemplo n.º 1
0
 /** Update the {@link ExecutorService} instance. */
 /*package*/ synchronized void resizeThreadPool() {
   queue.setExecutors(
       (maximumThreads == 0
           ? Executors.newCachedThreadPool()
           : Executors.newFixedThreadPool(maximumThreads)));
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
 /** Gets the snapshot of {@link Runner}s that are performing polling. */
 public List<Runner> getRunners() {
   return Util.filter(queue.getInProgress(), Runner.class);
 }
Ejemplo n.º 4
0
 public ExecutorService getExecutor() {
   return queue.getExecutors();
 }