Search in sources :

Example 16 with ExceptionHandlingAsyncTaskExecutor

use of io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor in project tutorials by eugenp.

the class AsyncConfiguration method getAsyncExecutor.

@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("dealerapp-Executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
Also used : ThreadPoolTaskExecutor(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor) ExceptionHandlingAsyncTaskExecutor(io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor) Bean(org.springframework.context.annotation.Bean)

Example 17 with ExceptionHandlingAsyncTaskExecutor

use of io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor in project FuryViewer by TheDoctor-95.

the class AsyncConfiguration method getAsyncExecutor.

@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("fury-viewer-Executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
Also used : ThreadPoolTaskExecutor(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor) ExceptionHandlingAsyncTaskExecutor(io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor) Bean(org.springframework.context.annotation.Bean)

Example 18 with ExceptionHandlingAsyncTaskExecutor

use of io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor in project ArTEMiS by ls1intum.

the class AsyncConfiguration method getAsyncExecutor.

@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("exercise-application-Executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
Also used : ThreadPoolTaskExecutor(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor) ExceptionHandlingAsyncTaskExecutor(io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor) Bean(org.springframework.context.annotation.Bean)

Example 19 with ExceptionHandlingAsyncTaskExecutor

use of io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor in project jhipster-registry by jhipster.

the class AsyncConfiguration method getAsyncExecutor.

@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(taskExecutionProperties.getPool().getCoreSize());
    executor.setMaxPoolSize(taskExecutionProperties.getPool().getMaxSize());
    executor.setQueueCapacity(taskExecutionProperties.getPool().getQueueCapacity());
    executor.setThreadNamePrefix(taskExecutionProperties.getThreadNamePrefix());
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
Also used : ThreadPoolTaskExecutor(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor) ExceptionHandlingAsyncTaskExecutor(io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor) Bean(org.springframework.context.annotation.Bean)

Aggregations

ExceptionHandlingAsyncTaskExecutor (io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor)19 Bean (org.springframework.context.annotation.Bean)19 ThreadPoolTaskExecutor (org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor)19