Anonymous avatar Anonymous committed 8d52fd9

QUARTZ-554 : clarify docs about nextFireTime and startTime

git-svn-id: http://svn.opensymphony.com/svn/quartz/trunk@738 69f7d36a-ea1c-0410-88ea-9fd03e4c9665

Comments (0)

Files changed (3)

src/java/org/quartz/CronTrigger.java

 
     /**
      * <p>
-     * Returns the next time at which the <code>CronTrigger</code> will fire.
-     * If the trigger will not fire again, <code>null</code> will be
-     * returned. The value returned is not guaranteed to be valid until after
-     * the <code>Trigger</code> has been added to the scheduler.
+     * Returns the next time at which the <code>Trigger</code> is scheduled to fire. If
+     * the trigger will not fire again, <code>null</code> will be returned.  Note that
+     * the time returned can possibly be in the past, if the time that was computed
+     * for the trigger to next fire has already arrived, but the scheduler has not yet
+     * been able to fire the trigger (which would likely be due to lack of resources
+     * e.g. threads).
      * </p>
+     *
+     * <p>The value returned is not guaranteed to be valid until after the <code>Trigger</code>
+     * has been added to the scheduler.
+     * </p>
+     *
+     * @see TriggerUtils#computeFireTimesBetween(Trigger, org.quartz.Calendar , Date, Date)
      */
+
     public Date getNextFireTime() {
         return this.nextFireTime;
     }

src/java/org/quartz/SimpleTrigger.java

 
     /**
      * <p>
-     * Returns the next time at which the <code>SimpleTrigger</code> will
-     * fire. If the trigger will not fire again, <code>null</code> will be
-     * returned. The value returned is not guaranteed to be valid until after
-     * the <code>Trigger</code> has been added to the scheduler.
-     * </p>
+     * Returns the next time at which the <code>Trigger</code> is scheduled to fire. If
+     * the trigger will not fire again, <code>null</code> will be returned.  Note that
+     * the time returned can possibly be in the past, if the time that was computed
+     * for the trigger to next fire has already arrived, but the scheduler has not yet
+     * been able to fire the trigger (which would likely be due to lack of resources
+     * e.g. threads).
+     * </p>
+     *
+     * <p>The value returned is not guaranteed to be valid until after the <code>Trigger</code>
+     * has been added to the scheduler.
+     * </p>
+     *
+     * @see TriggerUtils#computeFireTimesBetween(Trigger, Calendar, Date, Date)
      */
     public Date getNextFireTime() {
         return nextFireTime;

src/java/org/quartz/Trigger.java

      */
     public abstract Date getStartTime();
 
+    /**
+     * <p>
+     * The time at which the trigger's scheduling should start.  May or may not
+     * be the first actual fire time of the trigger, depending upon the type of
+     * trigger and the settings of the other properties of the trigger.  However
+     * the first actual first time will not be before this date.
+     * </p>
+     * <p>
+     * Setting a value in the past may cause a new trigger to compute a first
+     * fire time that is in the past, which may cause an immediate misfire
+     * of the trigger.
+     * </p>
+     */
     public abstract void setStartTime(Date startTime);
 
     public abstract void setEndTime(Date endTime);
 
     /**
      * <p>
-     * Returns the next time at which the <code>Trigger</code> will fire. If
-     * the trigger will not fire again, <code>null</code> will be returned.
-     * The value returned is not guaranteed to be valid until after the <code>Trigger</code>
+     * Returns the next time at which the <code>Trigger</code> is scheduled to fire. If
+     * the trigger will not fire again, <code>null</code> will be returned.  Note that
+     * the time returned can possibly be in the past, if the time that was computed
+     * for the trigger to next fire has already arrived, but the scheduler has not yet
+     * been able to fire the trigger (which would likely be due to lack of resources
+     * e.g. threads).
+     * </p>
+     *
+     * <p>The value returned is not guaranteed to be valid until after the <code>Trigger</code>
      * has been added to the scheduler.
      * </p>
+     *
+     * @see TriggerUtils#computeFireTimesBetween(Trigger, Calendar, Date, Date)
      */
     public abstract Date getNextFireTime();
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.