public class CustomTaskScheduler
extends org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
Modifier and Type | Field | Description |
---|---|---|
private java.util.concurrent.ScheduledFuture<?> |
future |
|
private static org.apache.log4j.Logger |
logger |
Constructor | Description |
---|---|
CustomTaskScheduler() |
Modifier and Type | Method | Description |
---|---|---|
java.util.concurrent.ScheduledFuture<?> |
scheduleAtFixedRate(java.lang.Runnable task,
long period) |
Schedule a repeated task.
|
void |
stopScheduledTask() |
Cancel the scheduled task if it exists.
|
createThread, getDefaultThreadNamePrefix, getThreadGroup, getThreadNamePrefix, getThreadPriority, isDaemon, nextThreadName, setDaemon, setThreadGroup, setThreadGroupName, setThreadPriority
newThread
afterPropertiesSet, destroy, initialize, setAwaitTerminationSeconds, setBeanName, setRejectedExecutionHandler, setThreadFactory, setThreadNamePrefix, setWaitForTasksToCompleteOnShutdown, shutdown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
schedule, scheduleAtFixedRate, scheduleAtFixedRate, scheduleWithFixedDelay, scheduleWithFixedDelay
createExecutor, execute, execute, getActiveCount, getPoolSize, getScheduledExecutor, getScheduledThreadPoolExecutor, initializeExecutor, isRemoveOnCancelPolicy, prefersShortLivedTasks, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, scheduleWithFixedDelay, setErrorHandler, setPoolSize, setRemoveOnCancelPolicy, submit, submit, submitListenable, submitListenable
private static final org.apache.log4j.Logger logger
private java.util.concurrent.ScheduledFuture<?> future
public java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable task, long period)
scheduleAtFixedRate
in class org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
task
- period
- public void stopScheduledTask()