Interface IntervalTrigger
- All Superinterfaces:
HasTriggerType
,Trigger
,TriggerRepresentation
Represents for inspecting settings specific to a IntervalTrigger.
An interval trigger is a schedule that repeats at a fixed interval of time starting from a given point in time, for
example, hourly, daily, every five minutes, every 30 seconds and so on.
- Since:
- 1.0.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Used to indicate the 'repeat count' of the trigger is indefinite.static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic IntervalTriggerBuilder
builder()
static IntervalTrigger
default long
Deprecated.default @NotNull TimeUnit
Deprecated.useinitialDelay()
default long
Deprecated.useinterval()
default @NotNull TimeUnit
Deprecated.useinterval()
long
Get the number of times theIntervalTrigger
should repeat, after which it will be automatically deleted.@NotNull Duration
@NotNull Duration
interval()
@NotNull Instant
nextTriggerTime
(@NotNull Instant time) Calculates the next valid trigger time from a given time and the trigger configurationdefault io.vertx.core.json.JsonObject
toJson()
Serialize this trigger to json object that helps to persist in external systemdefault @NotNull String
type()
Declares the trigger type@NotNull IntervalTrigger
validate()
Do validate trigger in runtime.Methods inherited from interface io.github.zero88.schedulerx.trigger.Trigger
display, preview, preview, rule
Methods inherited from interface io.github.zero88.schedulerx.trigger.repr.TriggerRepresentation
display
-
Field Details
-
TRIGGER_TYPE
- See Also:
-
REPEAT_INDEFINITELY
static final long REPEAT_INDEFINITELYUsed to indicate the 'repeat count' of the trigger is indefinite. Or in other words, the trigger should repeat continually until the trigger's ending timestamp.- See Also:
-
-
Method Details
-
builder
-
type
Description copied from interface:HasTriggerType
Declares the trigger type- Specified by:
type
in interfaceHasTriggerType
- Returns:
- the trigger type in string
-
getRepeat
long getRepeat()Get the number of times theIntervalTrigger
should repeat, after which it will be automatically deleted.- See Also:
-
initialDelay
- Returns:
- the initial delay time before emitting trigger in the first time.
- Since:
- 2.0.0
-
interval
- Returns:
- the time interval at which the
IntervalTrigger
should repeat. - Since:
- 2.0.0
-
getInitialDelay
Deprecated.useinitialDelay()
Get the initial delay time (ingetInitialDelayTimeUnit()
) before emitting trigger in the first time.- API Note:
- Default is
0
-
getInitialDelayTimeUnit
Deprecated.useinitialDelay()
Delay time unit- API Note:
- Default is
SECONDS
-
getInterval
Deprecated.useinterval()
Get the time interval (ingetIntervalTimeUnit()
) at which theIntervalTrigger
should repeat. -
getIntervalTimeUnit
Deprecated.useinterval()
Interval time unit- API Note:
- Default is
SECONDS
-
validate
Description copied from interface:Trigger
Do validate trigger in runtime. -
toJson
default io.vertx.core.json.JsonObject toJson()Description copied from interface:Trigger
Serialize this trigger to json object that helps to persist in external system -
create
-
nextTriggerTime
Calculates the next valid trigger time from a given time and the trigger configuration- Parameters:
time
- the given time- Returns:
- the next trigger time
-
initialDelay()