Package org.apache.camel.spring.util
Class CamelThreadPoolTaskScheduler
java.lang.Object
org.springframework.util.CustomizableThreadCreator
org.springframework.scheduling.concurrent.CustomizableThreadFactory
org.springframework.scheduling.concurrent.ExecutorConfigurationSupport
org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
org.apache.camel.spring.util.CamelThreadPoolTaskScheduler
- All Implemented Interfaces:
Serializable,Executor,ThreadFactory,EventListener,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle,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:
-
Field Summary
Fields inherited from class org.springframework.scheduling.concurrent.ExecutorConfigurationSupport
DEFAULT_PHASE, loggerFields inherited from interface org.springframework.core.task.AsyncTaskExecutor
TIMEOUT_IMMEDIATE, TIMEOUT_INDEFINITE -
Constructor Summary
ConstructorsConstructorDescriptionCamelThreadPoolTaskScheduler(org.apache.camel.CamelContext camelContext, Object source, String name) -
Method Summary
Modifier and TypeMethodDescriptionprotected ScheduledExecutorServicecreateExecutor(int poolSize, ThreadFactory threadFactory, RejectedExecutionHandler rejectedExecutionHandler) voidshutdown()Methods inherited from class org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
cancelRemainingTask, execute, getActiveCount, getClock, getPoolSize, getScheduledExecutor, getScheduledThreadPoolExecutor, initializeExecutor, isRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleAtFixedRate, scheduleWithFixedDelay, scheduleWithFixedDelay, setClock, setContinueExistingPeriodicTasksAfterShutdownPolicy, setErrorHandler, setExecuteExistingDelayedTasksAfterShutdownPolicy, setPoolSize, setRemoveOnCancelPolicy, setTaskDecorator, submit, submit, submitListenable, submitListenableMethods inherited from class org.springframework.scheduling.concurrent.ExecutorConfigurationSupport
afterExecute, afterPropertiesSet, beforeExecute, destroy, getPhase, initialize, initiateEarlyShutdown, initiateShutdown, isRunning, onApplicationEvent, setAcceptTasksAfterContextClose, setApplicationContext, setAwaitTerminationMillis, setAwaitTerminationSeconds, setBeanName, setPhase, setRejectedExecutionHandler, setThreadFactory, setThreadNamePrefix, setVirtualThreads, setWaitForTasksToCompleteOnShutdown, start, stop, stopMethods inherited from class org.springframework.scheduling.concurrent.CustomizableThreadFactory
newThreadMethods inherited from class org.springframework.util.CustomizableThreadCreator
createThread, getDefaultThreadNamePrefix, getThreadGroup, getThreadNamePrefix, getThreadPriority, isDaemon, nextThreadName, setDaemon, setThreadGroup, setThreadGroupName, setThreadPriorityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecutionMethods inherited from interface org.springframework.core.task.AsyncTaskExecutor
execute, submitCompletable, submitCompletableMethods inherited from interface org.springframework.scheduling.SchedulingTaskExecutor
prefersShortLivedTasksMethods inherited from interface org.springframework.context.SmartLifecycle
isAutoStartupMethods inherited from interface org.springframework.scheduling.TaskScheduler
schedule, scheduleAtFixedRate, scheduleAtFixedRate, scheduleWithFixedDelay, scheduleWithFixedDelay
-
Constructor Details
-
CamelThreadPoolTaskScheduler
-
-
Method Details
-
createExecutor
protected ScheduledExecutorService createExecutor(int poolSize, ThreadFactory threadFactory, RejectedExecutionHandler rejectedExecutionHandler) - Overrides:
createExecutorin classorg.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
-
shutdown
public void shutdown()- Overrides:
shutdownin classorg.springframework.scheduling.concurrent.ExecutorConfigurationSupport
-