use of io.fabric8.utils.ThreadFactory in project fabric8 by jboss-fuse.
the class MavenDownloadProxyServlet method start.
@Override
public synchronized void start() throws IOException {
// Create a thread pool with the given maxmimum number of threads
// All threads will time out after 60 seconds
int nbThreads = threadMaximumPoolSize > 0 ? threadMaximumPoolSize : 8;
executorService = new ThreadPoolExecutor(0, nbThreads, 60, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new ThreadFactory("MavenDownloadProxyServlet"));
if (this.timeout <= 0) {
// default
this.timeout = 5000;
}
LOGGER.info("Starting maven download servlet. Using async timeout value: " + this.timeout + "ms");
super.start();
}
Aggregations