use of pl.morecraft.dev.settler.configuration.util.ExceptionHandlingAsyncTaskExecutor in project Settler by EmhyrVarEmreis.
the class AsyncConfiguration method getAsyncExecutor.
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
log.debug("Creating Async Task Executor");
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(settlerProperties.getAsync().getCorePoolSize());
executor.setMaxPoolSize(settlerProperties.getAsync().getMaxPoolSize());
executor.setQueueCapacity(settlerProperties.getAsync().getQueueCapacity());
executor.setThreadNamePrefix("settler-Executor-");
return new ExceptionHandlingAsyncTaskExecutor(executor);
}
Aggregations