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, submitListenable
afterPropertiesSet, destroy, initialize, setAwaitTerminationSeconds, setBeanName, setRejectedExecutionHandler, setThreadFactory, setThreadNamePrefix, setWaitForTasksToCompleteOnShutdown, shutdown
newThread
createThread, getDefaultThreadNamePrefix, getThreadGroup, getThreadNamePrefix, getThreadPriority, isDaemon, nextThreadName, setDaemon, setThreadGroup, setThreadGroupName, setThreadPriority
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected 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.ApplicationContextAware
org.springframework.beans.BeansException
public 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.ThreadPoolTaskScheduler
protected <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>