use of org.obiba.mica.core.MicaAsyncTaskExecutor in project mica2 by obiba.
the class AsyncConfiguration method getOpalAsyncExecutor.
@Bean(name = "opalExecutor")
public Executor getOpalAsyncExecutor() {
log.debug("Creating Async Task Executor");
Integer poolSize = propertyResolver.getProperty("opal.poolSize", Integer.class, DEFAULT_POOL_SIZE);
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(poolSize);
executor.setMaxPoolSize(poolSize);
executor.setQueueCapacity(propertyResolver.getProperty("opal.queueCapacity", Integer.class, DEFAULT_QUEUE_CAPACITY));
executor.setThreadNamePrefix("mica-opal-executor-");
return new MicaAsyncTaskExecutor(executor);
}
use of org.obiba.mica.core.MicaAsyncTaskExecutor in project mica2 by obiba.
the class AsyncConfiguration method getAsyncExecutor.
@Override
@Bean
public Executor getAsyncExecutor() {
Integer poolSize = propertyResolver.getProperty("poolSize", Integer.class, DEFAULT_POOL_SIZE);
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(poolSize);
executor.setMaxPoolSize(poolSize);
executor.setQueueCapacity(propertyResolver.getProperty("queueCapacity", Integer.class, DEFAULT_QUEUE_CAPACITY));
executor.setThreadNamePrefix("mica-executor-");
return new MicaAsyncTaskExecutor(executor);
}
Aggregations