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, 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, shutdown, shutdownNow, submit, submit, submit
public 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)
CronExecutorService
schedule
in interface CronExecutorService
task
- the Runnable task to scheduleexpression
- a cron expressionelasticsearch-river-jdbc