Package io.quarkus.scheduler.runtime
Class SimpleScheduler.IntervalTrigger
- java.lang.Object
-
- io.quarkus.scheduler.runtime.SimpleScheduler.SimpleTrigger
-
- io.quarkus.scheduler.runtime.SimpleScheduler.IntervalTrigger
-
- All Implemented Interfaces:
Trigger
- Enclosing class:
- SimpleScheduler
static class SimpleScheduler.IntervalTrigger extends SimpleScheduler.SimpleTrigger
-
-
Field Summary
-
Fields inherited from class io.quarkus.scheduler.runtime.SimpleScheduler.SimpleTrigger
lastFireTime, start
-
-
Constructor Summary
Constructors Constructor Description IntervalTrigger(String id, ZonedDateTime start, long interval, Duration gracePeriod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ZonedDateTime
evaluate(ZonedDateTime now)
Instant
getNextFireTime()
Instant
getPreviousFireTime()
boolean
isOverdue()
The grace period is configurable withScheduled.overdueGracePeriod()
.String
toString()
-
Methods inherited from class io.quarkus.scheduler.runtime.SimpleScheduler.SimpleTrigger
getId, isRunning, setRunning
-
-
-
-
Constructor Detail
-
IntervalTrigger
IntervalTrigger(String id, ZonedDateTime start, long interval, Duration gracePeriod)
-
-
Method Detail
-
evaluate
ZonedDateTime evaluate(ZonedDateTime now)
- Specified by:
evaluate
in classSimpleScheduler.SimpleTrigger
- Returns:
- the scheduled time if fired,
null
otherwise
-
getNextFireTime
public Instant getNextFireTime()
- Returns:
- the next time at which the trigger is scheduled to fire, or
null
if it will not fire again
-
getPreviousFireTime
public Instant getPreviousFireTime()
- Returns:
- the previous time at which the trigger fired, or
null
if it has not fired yet
-
isOverdue
public boolean isOverdue()
Description copied from interface:Trigger
The grace period is configurable withScheduled.overdueGracePeriod()
.This method returns
false
if the last execution has been skipped.- Returns:
true
if the last execution of the trigger is overdue,false
otherwise- See Also:
Scheduled.overdueGracePeriod()
-
-