public class JobScheduleStrategies extends Object
| Constructor and Description |
|---|
JobScheduleStrategies(JobSchedulerClock clock) |
| Modifier and Type | Method and Description |
|---|---|
Optional<org.joda.time.DateTime> |
nextFutureTime(JobTriggerDto trigger)
Calculates the next time in the future.
|
Optional<org.joda.time.DateTime> |
nextTime(JobTriggerDto trigger)
Calculates the next execution time.
|
@Inject public JobScheduleStrategies(JobSchedulerClock clock)
public Optional<org.joda.time.DateTime> nextTime(JobTriggerDto trigger)
JobTriggerDto.nextTime() to calculate
the next one based on the trigger schedule.
If this returns an empty Optional, the trigger should not be executed anymore.
trigger - the trigger to use for the calculationpublic Optional<org.joda.time.DateTime> nextFutureTime(JobTriggerDto trigger)
JobTriggerDto.nextTime() to calculate
the next one based on the trigger schedule. It recalculates the next time until it is in the future.
If this returns an empty Optional, the trigger should not be executed anymore.
trigger - the trigger to use for the calculationCopyright © 2012–2021 Graylog, Inc.. All rights reserved.