public class DefaultRedisTimer extends ScheduledThreadPoolExecutor implements RedisTimer
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
DefaultRedisTimer() |
Modifier and Type | Method and Description |
---|---|
void |
schedule(Runnable command,
long delayMillis)
Schedule a command to run once after the given delay.
|
void |
scheduleWithFixedDelay(Runnable command,
long initialDelayMillis,
long delayMillis)
Schedule a command to run with a fixed delay.
|
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submit
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated, toString
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
public void schedule(Runnable command, long delayMillis)
RedisTimer
schedule
in interface RedisTimer
command
- CommanddelayMillis
- Delay in millisecondspublic void scheduleWithFixedDelay(Runnable command, long initialDelayMillis, long delayMillis)
RedisTimer
scheduleWithFixedDelay
in interface RedisTimer
command
- CommandinitialDelayMillis
- Initial delay before the command is first run, in millisecondsdelayMillis
- delay between successive runs, in millisecondsCopyright © 2013- Suresh Mahalingam. All Rights Reserved.