Interface PeriodFunctionCalculator
- 
 public interface PeriodFunctionCalculatorInterface to a computable temporal interval. When writing a custom period function, please note the following: The dispatcher processes all jobs using the same instance of the period function. This means that the same period function will be called with different parameters. Therefore, you have to be very careful when storing values inside the period function. Parameter values can be cached to increase performance, but you must test every time that the parameter values have not changed.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringdescription(Properties parameters)Human-readable (and understandable) description of this functionbooleanisOpen(DateTimeZone atTime, TimeZone timeZone, Properties parameters)see TimeWindowIntervalMethod#isOpen(DateTimeZone)DateTimeZonenextPotentialStatusChange(DateTimeZone startTime, DateTimeZone endTime, TimeZone timeZone, Properties parameters)see TimeWindowIntervalMethod#nextPotentialStatusChange(DateTimeZone,DateTimeZone)voidvalidate(Properties parameters)Throws runtime exception if the parameters are not valid for this period function
 
- 
- 
- 
Method Detail- 
nextPotentialStatusChangeDateTimeZone nextPotentialStatusChange(DateTimeZone startTime, DateTimeZone endTime, TimeZone timeZone, Properties parameters) throws com.redwood.scheduler.api.exception.SchedulerAPIException see TimeWindowIntervalMethod#nextPotentialStatusChange(DateTimeZone,DateTimeZone)- Parameters:
- parameters- parameters specific for this period function
- startTime- time to look from
- endTime- timestamp to look up to
- timeZone- time zone to work in
- Returns:
- a timestamp of the next potential status change AFTER the startTime
- Throws:
- com.redwood.scheduler.api.exception.SchedulerAPIException
 
 - 
isOpenboolean isOpen(DateTimeZone atTime, TimeZone timeZone, Properties parameters) throws com.redwood.scheduler.api.exception.SchedulerAPIException see TimeWindowIntervalMethod#isOpen(DateTimeZone)- Parameters:
- timeZone- time zone of the TimeWindowInterval
- atTime- timestamp to check
- parameters- parameters specific for this period function
- Returns:
- true if it is open at atTime
- Throws:
- com.redwood.scheduler.api.exception.SchedulerAPIException
 
 - 
validatevoid validate(Properties parameters) Throws runtime exception if the parameters are not valid for this period function- Parameters:
- parameters- parameters specific for this period function
 
 - 
descriptionString description(Properties parameters) Human-readable (and understandable) description of this function- Parameters:
- parameters- parameters specific for this period function
- Returns:
- human-readable (and understandable) description of this function
 
 
- 
 
-