new PoolExecutorThreadFactory(threadGroup, name + ".internal-", classLoader),
new RejectedExecutionHandler() {
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
String message = "Internal executor rejected task: " + r + ", because client is shutting down...";
logger.finest(message);
throw new RejectedExecutionException(message);
}
});
executor = new ThreadPoolExecutor(poolSize, poolSize, 0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<Runnable>(),
new PoolExecutorThreadFactory(threadGroup, name + ".cached-", classLoader),
new RejectedExecutionHandler() {
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
String message = "Internal executor rejected task: " + r + ", because client is shutting down...";
logger.finest(message);
throw new RejectedExecutionException(message);
}
});
scheduledExecutor = Executors.newSingleThreadScheduledExecutor(