use of org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler in project gravitee-management-rest-api by gravitee-io.
the class SyncConfiguration method taskScheduler.
@Bean
public TaskScheduler taskScheduler() {
ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
scheduler.setThreadNamePrefix("sync-");
return scheduler;
}
use of org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler in project gravitee-management-rest-api by gravitee-io.
the class DynamicPropertiesConfiguration method taskScheduler.
@Bean
public TaskScheduler taskScheduler() {
ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
scheduler.setThreadNamePrefix("refresher-");
return scheduler;
}
use of org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler in project micrometer by micrometer-metrics.
the class ExecutorServiceMetricsTest method taskScheduler.
@Test
public void taskScheduler() {
ThreadPoolTaskScheduler sched = new ThreadPoolTaskScheduler();
sched.initialize();
ExecutorServiceMetrics.monitor(registry, sched.getScheduledExecutor(), "sched");
assertThreadPoolExecutorMetrics("sched");
}
use of org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler in project openmeetings by apache.
the class Core method setDeadlockGuard.
public void setDeadlockGuard(RTMPConnection conn) {
ThreadPoolTaskScheduler deadlockGuard = new ThreadPoolTaskScheduler();
deadlockGuard.setPoolSize(16);
deadlockGuard.setDaemon(false);
deadlockGuard.setWaitForTasksToCompleteOnShutdown(true);
deadlockGuard.setThreadNamePrefix("DeadlockGuardScheduler-");
deadlockGuard.afterPropertiesSet();
conn.setDeadlockGuardScheduler(deadlockGuard);
}
use of org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler in project spring-integration by spring-projects.
the class DelayHandlerTests method setup.
@Before
public void setup() {
input.setBeanName("input");
output.setBeanName("output");
taskScheduler = new ThreadPoolTaskScheduler();
taskScheduler.afterPropertiesSet();
delayHandler = new DelayHandler(DELAYER_MESSAGE_GROUP_ID, taskScheduler);
delayHandler.setOutputChannel(output);
delayHandler.setBeanFactory(mock(BeanFactory.class));
input.subscribe(delayHandler);
output.subscribe(resultHandler);
}
Aggregations