Top Description Methods
org.springframework.scheduling

public Interface TriggerContext

Known Direct Implementers
org.springframework.scheduling.concurrent.ConcurrentTaskScheduler.EnterpriseConcurrentTriggerScheduler.TriggerAdapter.LastExecutionAdapter, org.springframework.scheduling.support.SimpleTriggerContext
Imports
java.time.Clock, .Instant, java.util.Date, org.springframework.lang.Nullable

Context object encapsulating last execution times and last completion time of a given task.
Authors
Juergen Hoeller, Arjen Poutsma
Since
3.0

Method Summary

Modifier and TypeMethod and Description
public default Clock
getClock()

Return the clock to use for trigger calculation.

public Instant
lastActualExecution()

Return the last actual execution time of the task, or null if not scheduled before.

public default Date
lastActualExecutionTime()

Deprecated since 6.0. as of 6.0, in favor on lastActualExecution()
Return the last actual execution time of the task, or null if not scheduled before.
public Instant
lastCompletion()

Return the last completion time of the task, or null if not scheduled before.

public default Date
lastCompletionTime()

Deprecated since 6.0. as of 6.0, in favor on lastCompletion()
Return the last completion time of the task, or null if not scheduled before.
public Instant
lastScheduledExecution()

Return the last scheduled execution time of the task, or null if not scheduled before.

public default Date
lastScheduledExecutionTime()

Deprecated since 6.0. as of 6.0, in favor on lastScheduledExecution()
Return the last scheduled execution time of the task, or null if not scheduled before.

Method Detail

getClockback to summary
public default Clock getClock()

Return the clock to use for trigger calculation.

Defaults to Clock#systemDefaultZone().

Since
5.3
See Also
TaskScheduler#getClock()
lastActualExecutionback to summary
public Instant lastActualExecution()

Return the last actual execution time of the task, or null if not scheduled before.

Annotations
@Nullable
Since
6.0
lastActualExecutionTimeback to summary
public default Date lastActualExecutionTime()

Deprecated

since 6.0.

as of 6.0, in favor on lastActualExecution()

Return the last actual execution time of the task, or null if not scheduled before.

The default implementation delegates to lastActualExecution().

Annotations
@Nullable
@Deprecated
since:6.0
lastCompletionback to summary
public Instant lastCompletion()

Return the last completion time of the task, or null if not scheduled before.

Annotations
@Nullable
Since
6.0
lastCompletionTimeback to summary
public default Date lastCompletionTime()

Deprecated

since 6.0.

as of 6.0, in favor on lastCompletion()

Return the last completion time of the task, or null if not scheduled before.

The default implementation delegates to lastCompletion().

Annotations
@Deprecated
since:6.0
@Nullable
lastScheduledExecutionback to summary
public Instant lastScheduledExecution()

Return the last scheduled execution time of the task, or null if not scheduled before.

Annotations
@Nullable
Since
6.0
lastScheduledExecutionTimeback to summary
public default Date lastScheduledExecutionTime()

Deprecated

since 6.0.

as of 6.0, in favor on lastScheduledExecution()

Return the last scheduled execution time of the task, or null if not scheduled before.

The default implementation delegates to lastScheduledExecution().

Annotations
@Nullable
@Deprecated
since:6.0