接口 Trigger
- 所有已知实现类:
CronTrigger,PeriodicTrigger
public interface Trigger
Common interface for trigger objects that determine the next execution time of a task that they get associated with.- 从以下版本开始:
- 3.0
- 作者:
- Juergen Hoeller
- 另请参阅:
TaskScheduler.schedule(Runnable, Trigger),CronTrigger
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 DatenextExecutionTime(TriggerContext triggerContext)Determine the next execution time according to the given trigger context.
方法详细资料
nextExecutionTime
@Nullable Date nextExecutionTime(TriggerContext triggerContext)
Determine the next execution time according to the given trigger context.- 参数:
triggerContext- context object encapsulating last execution times and last completion time- 返回:
- the next execution time as defined by the trigger, or
nullif the trigger won't fire anymore