public class CronThreadPoolExecutor extends ScheduledThreadPoolExecutor implements CronExecutorService
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
CronThreadPoolExecutor(int corePoolSize)
Constructs a new CronThreadPoolExecutor.
|
CronThreadPoolExecutor(int corePoolSize,
RejectedExecutionHandler handler)
Constructs a new CronThreadPoolExecutor.
|
CronThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory)
Constructs a new CronThreadPoolExecutor.
|
CronThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler)
Constructs a new CronThreadPoolExecutor.
|
| Modifier and Type | Method and Description |
|---|---|
Future<?> |
schedule(Runnable task,
CronExpression expression)
Schedules the specified task to execute according to the specified cron expression.
|
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submitafterExecute, 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, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskForclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submitpublic CronThreadPoolExecutor(int corePoolSize)
corePoolSize - the pool sizepublic CronThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory)
corePoolSize - the pool sizethreadFactory - the thread factorypublic CronThreadPoolExecutor(int corePoolSize, RejectedExecutionHandler handler)
corePoolSize - the pool sizehandler - the handler for rejected executionspublic CronThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler)
corePoolSize - the pool sizehandler - the handler for rejecting executionsthreadFactory - the thread factorypublic Future<?> schedule(Runnable task, CronExpression expression)
CronExecutorServiceschedule in interface CronExecutorServicetask - the Runnable task to scheduleexpression - a cron expressionelasticsearch-river-jdbc