public class ScheduleCalculator
extends java.lang.Object
Constructor and Description |
---|
ScheduleCalculator(Clock clock,
Schedule schedule)
Constructor for a calculator with no retry for the default time zone.
|
ScheduleCalculator(Clock clock,
Schedule schedule,
Schedule retry)
Constructor for a calculator with a retry schedule using the default time zone.
|
ScheduleCalculator(Clock clock,
Schedule schedule,
Schedule retry,
java.util.TimeZone timeZone)
Constructor for a calculator with a retry schedule and a timeZone.
|
ScheduleCalculator(Clock clock,
Schedule schedule,
java.util.TimeZone timeZone)
Constructor for a calculator with with a timeZone.
|
Modifier and Type | Method and Description |
---|---|
void |
addScheduleListener(ScheduleListener l) |
void |
calculateComplete() |
void |
calculateRetry()
Calculate the retry schedule.
|
protected void |
fireComplete(ScheduleResult lastComplete) |
protected void |
fireFailed() |
protected void |
fireInitialised() |
protected void |
fireRetry(Interval limits) |
java.lang.String |
getCurrentScheduleType()
Get the name of the current schedule.
|
Schedule |
getRetry()
Getter for retry.
|
Schedule |
getSchedule()
Getter for schedule.
|
void |
initialise() |
void |
initialise(ScheduleResult lastComplete,
java.util.Map<java.lang.Object,java.lang.Object> contextData)
Initialize the scheduler.
|
void |
removeScheduleListener(ScheduleListener l) |
public ScheduleCalculator(Clock clock, Schedule schedule)
clock
- The clock to use, may not be null.schedule
- The normal schedule, may not be null.public ScheduleCalculator(Clock clock, Schedule schedule, java.util.TimeZone timeZone)
clock
- The clock to use, may not be null.schedule
- The normal schedule, may not be null.timeZone
- The time zone. May be nullpublic ScheduleCalculator(Clock clock, Schedule schedule, Schedule retry)
clock
- The clock to use, may not be null.schedule
- The normal schedule, may not be null.retry
- The retrySchedule. May be null.public ScheduleCalculator(Clock clock, Schedule schedule, Schedule retry, java.util.TimeZone timeZone)
clock
- The clock to use, may not be null.schedule
- The normal schedule, may not be null.retry
- The retrySchedule. May be null.timeZone
- The time zone. May be nullpublic Schedule getSchedule()
public Schedule getRetry()
public void initialise()
public void initialise(ScheduleResult lastComplete, java.util.Map<java.lang.Object,java.lang.Object> contextData)
public java.lang.String getCurrentScheduleType()
public void calculateComplete()
public void calculateRetry()
public void addScheduleListener(ScheduleListener l)
public void removeScheduleListener(ScheduleListener l)
protected void fireInitialised()
protected void fireComplete(ScheduleResult lastComplete)
protected void fireRetry(Interval limits)
protected void fireFailed()