List of usage examples for java.util.concurrent Executors unconfigurableScheduledExecutorService
public static ScheduledExecutorService unconfigurableScheduledExecutorService( ScheduledExecutorService executor)
From source file:org.springframework.scheduling.concurrent.ScheduledExecutorFactoryBean.java
public void afterPropertiesSet() { if (logger.isInfoEnabled()) { logger.info("Initializing ScheduledExecutorService" + (this.beanName != null ? " '" + this.beanName + "'" : "")); }/*from w w w. j av a 2 s . com*/ ScheduledExecutorService executor = createExecutor(this.poolSize, this.threadFactory, this.rejectedExecutionHandler); // Register specified ScheduledExecutorTasks, if necessary. if (!ObjectUtils.isEmpty(this.scheduledExecutorTasks)) { registerTasks(this.scheduledExecutorTasks, executor); } // Wrap executor with an unconfigurable decorator. this.executor = (this.exposeUnconfigurableExecutor ? Executors.unconfigurableScheduledExecutorService(executor) : executor); }