public class CronScheduler
extends java.util.concurrent.ScheduledThreadPoolExecutor
ScheduledExecutorService-Implementierung, die anhand einer CronDefinition
periodische Aufträge planen kann
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
Constructor and Description |
---|
CronScheduler()
Erstellt einen CronScheduler mit einem Thread
|
CronScheduler(int corePoolSize)
Erstellt einen CronScheduler
|
CronScheduler(int corePoolSize,
java.util.concurrent.ThreadFactory threadFactory)
Erstellt einen CronScheduler
|
Modifier and Type | Method and Description |
---|---|
protected <V> java.util.concurrent.RunnableScheduledFuture<V> |
decorateTask(java.lang.Runnable runnable,
java.util.concurrent.RunnableScheduledFuture<V> task) |
protected long |
getTime()
Zum testen überschreibbar um eine andere Uhr zu benutzen.
|
<V> java.util.concurrent.ScheduledFuture<V> |
schedule(java.util.concurrent.Callable<V> callable,
CronDefinition cronDefinition)
Plant einen Auftrag
|
java.util.concurrent.ScheduledFuture<?> |
schedule(java.lang.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
public CronScheduler()
Erstellt einen CronScheduler mit einem Thread
public CronScheduler(int corePoolSize)
Erstellt einen CronScheduler
corePoolSize
- Anzahl Threadspublic CronScheduler(int corePoolSize, java.util.concurrent.ThreadFactory threadFactory)
Erstellt einen CronScheduler
corePoolSize
- Anzahl ThreadsthreadFactory
- ThreadFactorypublic java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable command, CronDefinition cronDefinition)
Plant einen Auftrag
command
- Auszuführender BefehlcronDefinition
- Auszuführende Zeitpunktepublic <V> java.util.concurrent.ScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable, CronDefinition cronDefinition)
Plant einen Auftrag
callable
- Auszuführender BefehlcronDefinition
- Auszuführende Zeitpunkteprotected <V> java.util.concurrent.RunnableScheduledFuture<V> decorateTask(java.lang.Runnable runnable, java.util.concurrent.RunnableScheduledFuture<V> task)
decorateTask
in class java.util.concurrent.ScheduledThreadPoolExecutor
protected long getTime()
Zum testen überschreibbar um eine andere Uhr zu benutzen.