接口 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.
从以下版本开始:
4.0
作者:
Juergen Hoeller
另请参阅:
  • 方法概要

    修饰符和类型
    方法
    说明
    nextExecution(TriggerContext triggerContext)
    Determine the next execution time according to the given trigger context.
    default Date
    Determine the next execution time according to the given trigger context.
  • 方法详细资料

    • nextExecutionTime

      @Nullable default 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 null if the trigger won't fire anymore
    • nextExecution

      @Nullable Instant nextExecution(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 null if the trigger won't fire anymore