Package io.quarkus.scheduler.runtime
Class SimpleScheduler.SimpleTrigger
- java.lang.Object
-
- io.quarkus.scheduler.runtime.SimpleScheduler.SimpleTrigger
-
- All Implemented Interfaces:
io.quarkus.scheduler.Trigger
- Direct Known Subclasses:
SimpleScheduler.CronTrigger
,SimpleScheduler.IntervalTrigger
- Enclosing class:
- SimpleScheduler
abstract static class SimpleScheduler.SimpleTrigger extends Object implements io.quarkus.scheduler.Trigger
-
-
Field Summary
Fields Modifier and Type Field Description protected String
id
protected ZonedDateTime
lastFireTime
protected String
methodDescription
protected ZonedDateTime
start
-
Constructor Summary
Constructors Constructor Description SimpleTrigger(String id, ZonedDateTime start, String description)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) abstract ZonedDateTime
evaluate(ZonedDateTime now)
String
getId()
String
getMethodDescription()
Instant
getPreviousFireTime()
(package private) boolean
isRunning()
(package private) void
setRunning(boolean running)
-
-
-
Field Detail
-
id
protected final String id
-
methodDescription
protected final String methodDescription
-
start
protected final ZonedDateTime start
-
lastFireTime
protected volatile ZonedDateTime lastFireTime
-
-
Constructor Detail
-
SimpleTrigger
SimpleTrigger(String id, ZonedDateTime start, String description)
-
-
Method Detail
-
evaluate
abstract ZonedDateTime evaluate(ZonedDateTime now)
- Parameters:
now
- The current date-time in the default time zone- Returns:
- the scheduled time if fired,
null
otherwise
-
getPreviousFireTime
public Instant getPreviousFireTime()
- Specified by:
getPreviousFireTime
in interfaceio.quarkus.scheduler.Trigger
-
getId
public String getId()
- Specified by:
getId
in interfaceio.quarkus.scheduler.Trigger
-
isRunning
boolean isRunning()
-
setRunning
void setRunning(boolean running)
-
getMethodDescription
public String getMethodDescription()
- Specified by:
getMethodDescription
in interfaceio.quarkus.scheduler.Trigger
-
-