use of com.sequenceiq.cloudbreak.concurrent.MDCCleanerTaskDecorator in project cloudbreak by hortonworks.
the class AppConfig method intermediateBuilderExecutor.
@Bean
public AsyncTaskExecutor intermediateBuilderExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(intermediateCorePoolSize);
executor.setQueueCapacity(intermediateQueueCapacity);
executor.setThreadNamePrefix("intermediateBuilderExecutor-");
executor.setTaskDecorator(new MDCCleanerTaskDecorator());
executor.initialize();
return executor;
}
use of com.sequenceiq.cloudbreak.concurrent.MDCCleanerTaskDecorator in project cloudbreak by hortonworks.
the class AppConfig method resourceBuilderExecutor.
@Bean
public AsyncTaskExecutor resourceBuilderExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(corePoolSize);
executor.setQueueCapacity(queueCapacity);
executor.setThreadNamePrefix("resourceBuilderExecutor-");
executor.setTaskDecorator(new MDCCleanerTaskDecorator());
executor.initialize();
return executor;
}
use of com.sequenceiq.cloudbreak.concurrent.MDCCleanerTaskDecorator in project cloudbreak by hortonworks.
the class AppConfig method containerBootstrapBuilderExecutor.
@Bean
public AsyncTaskExecutor containerBootstrapBuilderExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(containerCorePoolSize);
executor.setQueueCapacity(containerteQueueCapacity);
executor.setThreadNamePrefix("containerBootstrapBuilderExecutor-");
executor.setTaskDecorator(new MDCCleanerTaskDecorator());
executor.initialize();
return executor;
}
use of com.sequenceiq.cloudbreak.concurrent.MDCCleanerTaskDecorator in project cloudbreak by hortonworks.
the class AsyncConfig method getAsyncExecutor.
@Override
public Executor getAsyncExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(CORE_POOL_SIZE);
executor.setMaxPoolSize(MAX_POOL_SIZE);
executor.setQueueCapacity(QUEUE_CAPACITY);
executor.setThreadNamePrefix("asyncExecutor-");
executor.setTaskDecorator(new MDCCleanerTaskDecorator());
executor.initialize();
return executor;
}
Aggregations