Class SingleTimeTaskImpl
java.lang.Object
cool.scx.scheduling.SingleTimeTaskImpl
- All Implemented Interfaces:
ScheduleTask<SingleTimeTask>,SingleTimeTask
单次执行的任务
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoStart(long startDelay) executor(ScheduledExecutorService executor) 执行器 默认会使用单例的 ScxScheduler 不建议自行设置expirationPolicy(ExpirationPolicy expirationPolicy) 过期策略start()启动任务startDelay(Duration delay) task(Consumer<ScheduleStatus> task) 任务Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cool.scx.scheduling.ScheduleTask
startMethods inherited from interface cool.scx.scheduling.SingleTimeTask
concurrent, maxRunCount
-
Constructor Details
-
SingleTimeTaskImpl
public SingleTimeTaskImpl()
-
-
Method Details
-
startTime
- Specified by:
startTimein interfaceSingleTimeTask
-
startTime
- Specified by:
startTimein interfaceSingleTimeTask
-
startDelay
- Specified by:
startDelayin interfaceSingleTimeTask
-
expirationPolicy
Description copied from interface:ScheduleTask过期策略- Specified by:
expirationPolicyin interfaceScheduleTask<SingleTimeTask>- Parameters:
expirationPolicy- a- Returns:
- a
-
executor
Description copied from interface:ScheduleTask执行器 默认会使用单例的 ScxScheduler 不建议自行设置- Specified by:
executorin interfaceScheduleTask<SingleTimeTask>- Parameters:
executor- 执行器- Returns:
- self
-
task
Description copied from interface:ScheduleTask任务- Specified by:
taskin interfaceScheduleTask<SingleTimeTask>- Parameters:
task- 任务- Returns:
- self
-
start
Description copied from interface:ScheduleTask启动任务- Specified by:
startin interfaceScheduleTask<SingleTimeTask>- Returns:
- 调度状态
-
doStart
-