public class CubaThreadPoolTaskScheduler
extends org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
CubaThreadPoolTaskScheduler.TaskDecorator<V> |
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.context.ApplicationContext |
applicationContext |
protected StatisticsAccumulator |
statisticsAccumulator |
| Constructor and Description |
|---|
CubaThreadPoolTaskScheduler() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.concurrent.ScheduledExecutorService |
createExecutor(int poolSize,
java.util.concurrent.ThreadFactory threadFactory,
java.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler) |
protected <V> java.util.concurrent.RunnableScheduledFuture<V> |
decorate(java.util.concurrent.Callable<V> callable,
java.util.concurrent.RunnableScheduledFuture<V> task) |
protected <V> java.util.concurrent.RunnableScheduledFuture<V> |
decorate(java.lang.Runnable runnable,
java.util.concurrent.RunnableScheduledFuture<V> task) |
void |
onApplicationEvent(org.springframework.context.event.ContextClosedEvent event) |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setStatisticsAccumulator(StatisticsAccumulator statisticsAccumulator) |
cancelRemainingTask, execute, execute, getActiveCount, getPoolSize, getScheduledExecutor, getScheduledThreadPoolExecutor, initializeExecutor, isRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleAtFixedRate, scheduleWithFixedDelay, scheduleWithFixedDelay, setErrorHandler, setPoolSize, setRemoveOnCancelPolicy, submit, submit, submitListenable, submitListenableafterPropertiesSet, destroy, initialize, setAwaitTerminationSeconds, setBeanName, setRejectedExecutionHandler, setThreadFactory, setThreadNamePrefix, setWaitForTasksToCompleteOnShutdown, shutdownnewThreadcreateThread, getDefaultThreadNamePrefix, getThreadGroup, getThreadNamePrefix, getThreadPriority, isDaemon, nextThreadName, setDaemon, setThreadGroup, setThreadGroupName, setThreadPriorityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected org.springframework.context.ApplicationContext applicationContext
protected StatisticsAccumulator statisticsAccumulator
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void setStatisticsAccumulator(StatisticsAccumulator statisticsAccumulator)
protected java.util.concurrent.ScheduledExecutorService createExecutor(int poolSize,
java.util.concurrent.ThreadFactory threadFactory,
java.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
createExecutor in class org.springframework.scheduling.concurrent.ThreadPoolTaskSchedulerprotected <V> java.util.concurrent.RunnableScheduledFuture<V> decorate(java.lang.Runnable runnable,
java.util.concurrent.RunnableScheduledFuture<V> task)
protected <V> java.util.concurrent.RunnableScheduledFuture<V> decorate(java.util.concurrent.Callable<V> callable,
java.util.concurrent.RunnableScheduledFuture<V> task)
public void onApplicationEvent(@Nonnull
org.springframework.context.event.ContextClosedEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>