类 SimpleTriggerContext

java.lang.Object
cn.taketoday.scheduling.support.SimpleTriggerContext
所有已实现的接口:
TriggerContext

public class SimpleTriggerContext extends Object implements TriggerContext
Simple data holder implementation of the TriggerContext interface.
从以下版本开始:
4.0
作者:
Juergen Hoeller, Harry Yang
  • 构造器详细资料

    • SimpleTriggerContext

      public SimpleTriggerContext()
      Create a SimpleTriggerContext with all time values set to null, exposing the system clock for the default time zone.
    • SimpleTriggerContext

      public SimpleTriggerContext(@Nullable Date lastScheduledExecutionTime, @Nullable Date lastActualExecutionTime, @Nullable Date lastCompletionTime)
      Create a SimpleTriggerContext with the given time values, exposing the system clock for the default time zone.
      参数:
      lastScheduledExecutionTime - last scheduled execution time
      lastActualExecutionTime - last actual execution time
      lastCompletionTime - last completion time
    • SimpleTriggerContext

      public SimpleTriggerContext(@Nullable Instant lastScheduledExecution, @Nullable Instant lastActualExecution, @Nullable Instant lastCompletion)
      Create a SimpleTriggerContext with the given time values, exposing the system clock for the default time zone.
      参数:
      lastScheduledExecution - last scheduled execution time
      lastActualExecution - last actual execution time
      lastCompletion - last completion time
    • SimpleTriggerContext

      public SimpleTriggerContext(Clock clock)
      Create a SimpleTriggerContext with all time values set to null, exposing the given clock.
      参数:
      clock - the clock to use for trigger calculation
      另请参阅:
  • 方法详细资料

    • update

      public void update(@Nullable Date lastScheduledExecutionTime, @Nullable Date lastActualExecutionTime, @Nullable Date lastCompletionTime)
      Update this holder's state with the latest time values.
      参数:
      lastScheduledExecutionTime - last scheduled execution time
      lastActualExecutionTime - last actual execution time
      lastCompletionTime - last completion time
    • update

      public void update(@Nullable Instant lastScheduledExecution, @Nullable Instant lastActualExecution, @Nullable Instant lastCompletion)
      Update this holder's state with the latest time values.
      参数:
      lastScheduledExecution - last scheduled execution time
      lastActualExecution - last actual execution time
      lastCompletion - last completion time
    • getClock

      public Clock getClock()
      从接口复制的说明: TriggerContext
      Return the clock to use for trigger calculation.
      指定者:
      getClock 在接口中 TriggerContext
      另请参阅:
    • lastScheduledExecution

      @Nullable public Instant lastScheduledExecution()
      从接口复制的说明: TriggerContext
      Return the last scheduled execution time of the task, or null if not scheduled before.
      指定者:
      lastScheduledExecution 在接口中 TriggerContext
    • lastActualExecution

      @Nullable public Instant lastActualExecution()
      从接口复制的说明: TriggerContext
      Return the last actual execution time of the task, or null if not scheduled before.
      指定者:
      lastActualExecution 在接口中 TriggerContext
    • lastCompletion

      @Nullable public Instant lastCompletion()
      从接口复制的说明: TriggerContext
      Return the last completion time of the task, or null if not scheduled before.
      指定者:
      lastCompletion 在接口中 TriggerContext