public class CronScheduler extends ScheduledThreadPoolExecutor
CronDefinition
periodische Aufträge planen kannModifier and Type | Class and Description |
---|---|
private class |
CronScheduler.CronTask<V> |
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
CronScheduler()
Erstellt einen CronScheduler mit einem Thread
|
CronScheduler(int corePoolSize)
Erstellt einen CronScheduler
|
CronScheduler(int corePoolSize,
ThreadFactory threadFactory)
Erstellt einen CronScheduler
|
Modifier and Type | Method and Description |
---|---|
protected <V> RunnableScheduledFuture<V> |
decorateTask(Runnable runnable,
RunnableScheduledFuture<V> task) |
<V> ScheduledFuture<V> |
schedule(Callable<V> callable,
CronDefinition cronDefinition)
Plant einen Auftrag
|
ScheduledFuture<?> |
schedule(Runnable command,
CronDefinition cronDefinition)
Plant einen Auftrag
|
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 CronScheduler()
public CronScheduler(int corePoolSize)
corePoolSize
- Anzahl Threadspublic CronScheduler(int corePoolSize, ThreadFactory threadFactory)
corePoolSize
- Anzahl ThreadsthreadFactory
- ThreadFactorypublic ScheduledFuture<?> schedule(Runnable command, CronDefinition cronDefinition)
command
- Auszuführender BefehlcronDefinition
- Auszuführende Zeitpunktepublic <V> ScheduledFuture<V> schedule(Callable<V> callable, CronDefinition cronDefinition)
callable
- Auszuführender BefehlcronDefinition
- Auszuführende Zeitpunkteprotected <V> RunnableScheduledFuture<V> decorateTask(Runnable runnable, RunnableScheduledFuture<V> task)
decorateTask
in class ScheduledThreadPoolExecutor