|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.integration.scheduling.IntervalTrigger
public class IntervalTrigger
A trigger for periodic execution. The interval may be applied as either fixed-rate or fixed-delay, and an initial delay value may also be configured. The default initial delay is 0, and the default behavior is fixed-delay: each subsequent delay is measured from the last completion time. To enable execution between the scheduled start time of each execution, set 'fixedRate' to true.
Constructor Summary | |
---|---|
IntervalTrigger(long interval)
Create a trigger with the given interval in milliseconds. |
|
IntervalTrigger(long interval,
java.util.concurrent.TimeUnit timeUnit)
Create a trigger with the given interval and time unit. |
Method Summary | |
---|---|
java.util.Date |
getNextRunTime(java.util.Date lastScheduledRunTime,
java.util.Date lastCompleteTime)
Returns the next time a task should run. |
void |
setFixedRate(boolean fixedRate)
Specify whether the interval should be measured between the scheduled start times rather than between actual completion times (the latter, "fixed delay" behavior, is the default). |
void |
setInitialDelay(long initialDelay)
Specify the delay for the initial execution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntervalTrigger(long interval)
public IntervalTrigger(long interval, java.util.concurrent.TimeUnit timeUnit)
Method Detail |
---|
public void setInitialDelay(long initialDelay)
public void setFixedRate(boolean fixedRate)
public java.util.Date getNextRunTime(java.util.Date lastScheduledRunTime, java.util.Date lastCompleteTime)
getNextRunTime
in interface Trigger
lastScheduledRunTime
- last time the relevant task was scheduled to
run, or null
if it has never been scheduledlastCompleteTime
- last time the relevant task finished or
null
if it did not run to completion
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |