Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clarifications to Trigger JavaDoc #273

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions api/src/main/java/jakarta/enterprise/concurrent/Trigger.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -99,13 +99,10 @@ public interface Trigger {
*
* @param lastExecutionInfo information about the last execution of the task.
* This value will be null if the task has not yet run.
* @param taskScheduledTime the date/time in which the task was scheduled using
* the {@code ManagedScheduledExecutorService.schedule}
* method.
* @return the date/time in which the next task iteration should execute on or
* after.


* @param taskScheduledTime the date/time at which the
* {@code ManagedScheduledExecutorService.schedule}
* method was invoked to schedule the task.
* @return the date/time after which the next execution of the task should start.
*/
public java.util.Date getNextRunTime(LastExecution lastExecutionInfo,
java.util.Date taskScheduledTime);
Expand All @@ -116,14 +113,14 @@ public java.util.Date getNextRunTime(LastExecution lastExecutionInfo,
* This is useful if the task shouldn't run because it is late or if the task
* is paused or suspended.
* <p>
* Once this task is skipped, the state of it's Future's result will throw a
* Once this task is skipped, the state of its Future's result will throw a
* {@link SkippedException}. Unchecked exceptions will be wrapped in a
* <code>SkippedException</code>.
*
* @param lastExecutionInfo information about the last execution of the task.
* This value will be null if the task has not yet run.
* @param scheduledRunTime the date/time that the task was originally scheduled
* to run.
* @param scheduledRunTime the date/time after which this execution of the task
* is scheduled to start.
* @return true if the task should be skipped and rescheduled.
*/
public boolean skipRun(LastExecution lastExecutionInfo,
Expand Down