Polishing

This commit is contained in:
Sam Brannen
2022-12-18 13:20:46 +01:00
parent 511dab1ade
commit 0bfddbc9cb
3 changed files with 19 additions and 14 deletions

View File

@@ -34,6 +34,7 @@ public interface Trigger {
/**
* Determine the next execution time according to the given trigger context.
* <p>The default implementation delegates to {@link #nextExecution(TriggerContext)}.
* @param triggerContext context object encapsulating last execution times
* and last completion time
* @return the next execution time as defined by the trigger,

View File

@@ -33,9 +33,9 @@ public interface TriggerContext {
/**
* Return the clock to use for trigger calculation.
* <p>Defaults to {@link Clock#systemDefaultZone()}.
* @since 5.3
* @see TaskScheduler#getClock()
* @see Clock#systemDefaultZone()
*/
default Clock getClock() {
return Clock.systemDefaultZone();
@@ -44,6 +44,7 @@ public interface TriggerContext {
/**
* Return the last <i>scheduled</i> execution time of the task,
* or {@code null} if not scheduled before.
* <p>The default implementation delegates to {@link #lastScheduledExecution()}.
* @deprecated as of 6.0, in favor on {@link #lastScheduledExecution()}
*/
@Nullable
@@ -64,10 +65,11 @@ public interface TriggerContext {
/**
* Return the last <i>actual</i> execution time of the task,
* or {@code null} if not scheduled before.
* <p>The default implementation delegates to {@link #lastActualExecution()}.
* @deprecated as of 6.0, in favor on {@link #lastActualExecution()}
*/
@Deprecated(since = "6.0")
@Nullable
@Deprecated(since = "6.0")
default Date lastActualExecutionTime() {
Instant instant = lastActualExecution();
return instant != null ? Date.from(instant) : null;
@@ -83,6 +85,7 @@ public interface TriggerContext {
/**
* Return the last completion time of the task,
* or {@code null} if not scheduled before.
* <p>The default implementation delegates to {@link #lastCompletion()}.
* @deprecated as of 6.0, in favor on {@link #lastCompletion()}
*/
@Deprecated(since = "6.0")