use of com.sequenceiq.cloudbreak.concurrent.MDCCleanerThreadPoolExecutor in project cloudbreak by hortonworks.
the class EventBusConfig method getEventBusDispatcher.
private Dispatcher getEventBusDispatcher() {
ClassLoader context = new ClassLoader(Thread.currentThread().getContextClassLoader()) {
};
MDCCleanerThreadPoolExecutor executorService = new MDCCleanerThreadPoolExecutor(eventBusThreadPoolSize, eventBusThreadPoolSize, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(eventBusThreadPoolSize), new NamedDaemonThreadFactory("reactorDispatcher", context), (r, executor) -> r.run());
return new ThreadPoolExecutorDispatcher(eventBusThreadPoolSize, eventBusThreadPoolSize, executorService);
}
Aggregations