Class CamelThreadPoolTaskScheduler

  • All Implemented Interfaces:
    Serializable, Executor, ThreadFactory, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.core.task.AsyncListenableTaskExecutor, org.springframework.core.task.AsyncTaskExecutor, org.springframework.core.task.TaskExecutor, org.springframework.scheduling.SchedulingTaskExecutor, org.springframework.scheduling.TaskScheduler

    public class CamelThreadPoolTaskScheduler
    extends org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
    A Camel extension of Spring's ThreadPoolTaskScheduler which uses the ExecutorServiceManager to create and destroy the thread pool, which ensures the thread pool is also managed and consistent with other usages of thread pools in Camel.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.springframework.scheduling.concurrent.ExecutorConfigurationSupport

        logger
      • Fields inherited from interface org.springframework.core.task.AsyncTaskExecutor

        TIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected ScheduledExecutorService createExecutor​(int poolSize, ThreadFactory threadFactory, RejectedExecutionHandler rejectedExecutionHandler)  
      void shutdown()  
      • Methods inherited from class org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler

        cancelRemainingTask, execute, execute, getActiveCount, getClock, getPoolSize, getScheduledExecutor, getScheduledThreadPoolExecutor, initializeExecutor, isRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleAtFixedRate, scheduleWithFixedDelay, scheduleWithFixedDelay, setClock, setContinueExistingPeriodicTasksAfterShutdownPolicy, setErrorHandler, setExecuteExistingDelayedTasksAfterShutdownPolicy, setPoolSize, setRemoveOnCancelPolicy, submit, submit, submitListenable, submitListenable
      • Methods inherited from class org.springframework.scheduling.concurrent.ExecutorConfigurationSupport

        afterPropertiesSet, destroy, initialize, setAwaitTerminationMillis, setAwaitTerminationSeconds, setBeanName, setRejectedExecutionHandler, setThreadFactory, setThreadNamePrefix, setWaitForTasksToCompleteOnShutdown
      • Methods inherited from class org.springframework.scheduling.concurrent.CustomizableThreadFactory

        newThread
      • Methods inherited from class org.springframework.util.CustomizableThreadCreator

        createThread, getDefaultThreadNamePrefix, getThreadGroup, getThreadNamePrefix, getThreadPriority, isDaemon, nextThreadName, setDaemon, setThreadGroup, setThreadGroupName, setThreadPriority
      • Methods inherited from interface org.springframework.scheduling.SchedulingTaskExecutor

        prefersShortLivedTasks
      • Methods inherited from interface org.springframework.scheduling.TaskScheduler

        schedule, scheduleAtFixedRate, scheduleAtFixedRate, scheduleWithFixedDelay, scheduleWithFixedDelay
    • Constructor Detail

      • CamelThreadPoolTaskScheduler

        public CamelThreadPoolTaskScheduler​(org.apache.camel.CamelContext camelContext,
                                            Object source,
                                            String name)
    • Method Detail

      • shutdown

        public void shutdown()
        Overrides:
        shutdown in class org.springframework.scheduling.concurrent.ExecutorConfigurationSupport