示例#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();
 }