java.util.concurrent.Executor
, java.util.concurrent.ExecutorService
, java.util.concurrent.ScheduledExecutorService
public class CronScheduler
extends java.util.concurrent.ScheduledThreadPoolExecutor
CronDefinition
periodische Aufträge planen kannjava.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
Constructor | 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 | 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.
|
java.util.concurrent.ScheduledFuture<?> |
schedule(java.lang.Runnable command,
CronDefinition cronDefinition) |
Plant einen Auftrag
|
<V> java.util.concurrent.ScheduledFuture<V> |
schedule(java.util.concurrent.Callable<V> callable,
CronDefinition cronDefinition) |
Plant einen Auftrag
|
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
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
public CronScheduler()
public CronScheduler(int corePoolSize)
corePoolSize
- Anzahl Threadspublic CronScheduler(int corePoolSize, java.util.concurrent.ThreadFactory threadFactory)
corePoolSize
- Anzahl ThreadsthreadFactory
- ThreadFactorypublic java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable command, CronDefinition cronDefinition)
command
- Auszuführender BefehlcronDefinition
- Auszuführende Zeitpunktepublic <V> java.util.concurrent.ScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable, CronDefinition cronDefinition)
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()