TaskScheduler interface,
delegating to a target scheduler based on an identified qualifier
or using a default scheduler otherwise.
SchedulingAwareRunnable#getQualifier()
| Modifier and Type | Field and Description |
|---|---|
| private BeanFactory | |
| private String | |
| public static final String | DEFAULT_TASK_SCHEDULER_BEAN_NAME
The default name of the |
| private final Supplier | |
| private StringValueResolver | |
| private volatile ScheduledExecutorService | |
| protected static final Log |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | destroy()
Implements org. Destroy the local default executor, if any. |
| protected TaskScheduler | |
| protected TaskScheduler | |
| protected String | |
| protected TaskScheduler | |
| private <T> T | |
| public ScheduledFuture | schedule(Runnable
the Runnable to execute whenever the trigger fires task, Trigger an implementation of the trigger)Trigger interface,
e.g. a org. object
wrapping a cron expressionImplements org. Schedule the given |
| public ScheduledFuture | schedule(Runnable
the Runnable to execute whenever the trigger fires task, Instant the desired execution time for the task
(if this is in the past, the task will be executed immediately, i.e. as soon as possible) startTime)Implements org. Schedule the given |
| public ScheduledFuture | scheduleAtFixedRate(Runnable
the Runnable to execute whenever the trigger fires task, Instant the desired first execution time for the task
(if this is in the past, the task will be executed immediately, i.e. as soon as possible) startTime, Duration the interval between successive executions of the task period)Implements org. Schedule the given |
| public ScheduledFuture | scheduleAtFixedRate(Runnable
the Runnable to execute whenever the trigger fires task, Duration the interval between successive executions of the task period)Implements org. Schedule the given |
| public ScheduledFuture | scheduleWithFixedDelay(Runnable
the Runnable to execute whenever the trigger fires task, Instant the desired first execution time for the task
(if this is in the past, the task will be executed immediately, i.e. as soon as possible) startTime, Duration the delay between the completion of one execution and the start of the next delay)Implements org. Schedule the given |
| public ScheduledFuture | scheduleWithFixedDelay(Runnable
the Runnable to execute whenever the trigger fires task, Duration the delay between the completion of one execution and the start of the next delay)Implements org. Schedule the given |
| public void | setBeanFactory(BeanFactory
owning BeanFactory (never beanFactory)null).
The bean can immediately call methods on the factory.Implements org. The bean factory for scheduler lookups. |
| public void | setBeanName(String
the name of the bean in the factory.
Note that this name is the actual bean name used in the factory, which may
differ from the originally specified name: in particular for inner bean
names, the actual bean name might have been made unique through appending
"#..." suffixes. Use the name)BeanFactoryUtils#originalBeanName(String)
method to extract the original bean name (without suffix), if desired.Implements org. The bean name for this router, or the bean name of the containing bean if the router instance is internally held. |
| beanFactory | back to summary |
|---|---|
| private BeanFactory beanFactory
| |
| beanName | back to summary |
|---|---|
| private String beanName
| |
| DEFAULT_TASK_SCHEDULER_BEAN_NAME | back to summary |
|---|---|
| public static final String DEFAULT_TASK_SCHEDULER_BEAN_NAME The default name of the Note that the initial lookup happens by type; this is just the fallback in case of multiple scheduler beans found in the context. | |
| defaultScheduler | back to summary |
|---|---|
| private final Supplier<TaskScheduler> defaultScheduler | |
| embeddedValueResolver | back to summary |
|---|---|
| private StringValueResolver embeddedValueResolver
| |
| localExecutor | back to summary |
|---|---|
| private volatile ScheduledExecutorService localExecutor
| |
| logger | back to summary |
|---|---|
| protected static final Log logger | |
| TaskSchedulerRouter | back to summary |
|---|---|
| public TaskSchedulerRouter() | |
| destroy | back to summary |
|---|---|
| public void destroy() Implements org. Destroy the local default executor, if any.
| |
| determineDefaultScheduler | back to summary |
|---|---|
| protected TaskScheduler determineDefaultScheduler() | |
| determineQualifiedScheduler | back to summary |
|---|---|
| protected TaskScheduler determineQualifiedScheduler(String qualifier) | |
| determineQualifier | back to summary |
|---|---|
protected String determineQualifier(Runnable task)
| |
| determineTargetScheduler | back to summary |
|---|---|
| protected TaskScheduler determineTargetScheduler(Runnable task) | |
| resolveSchedulerBean | back to summary |
|---|---|
| private <T> T resolveSchedulerBean(BeanFactory beanFactory, Class<T> schedulerType, boolean byName) | |
| schedule | back to summary |
|---|---|
| public ScheduledFuture Implements org. Doc from org. Schedule the given Execution will end once the scheduler shuts down or the returned
| |
| schedule | back to summary |
|---|---|
| public ScheduledFuture Implements org. Doc from org. Schedule the given Execution will end once the scheduler shuts down or the returned
| |
| scheduleAtFixedRate | back to summary |
|---|---|
| public ScheduledFuture Implements org. Doc from org. Schedule the given Execution will end once the scheduler shuts down or the returned
| |
| scheduleAtFixedRate | back to summary |
|---|---|
| public ScheduledFuture Implements org. Doc from org. Schedule the given Execution will end once the scheduler shuts down or the returned
| |
| scheduleWithFixedDelay | back to summary |
|---|---|
| public ScheduledFuture Implements org. Doc from org. Schedule the given Execution will end once the scheduler shuts down or the returned
| |
| scheduleWithFixedDelay | back to summary |
|---|---|
| public ScheduledFuture Implements org. Doc from org. Schedule the given Execution will end once the scheduler shuts down or the returned
| |
| setBeanFactory | back to summary |
|---|---|
| public void setBeanFactory(BeanFactory beanFactory) Implements org. The bean factory for scheduler lookups.
| |
| setBeanName | back to summary |
|---|---|
| public void setBeanName(String name) Implements org. The bean name for this router, or the bean name of the containing bean if the router instance is internally held.
| |