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
FieldsModifier and TypeFieldDescriptionstatic final longUsed to indicate the 'repeat count' of the trigger is indefinite.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic IntervalTriggerBuilderbuilder()static IntervalTriggerdefault longDeprecated.default @NotNull TimeUnitDeprecated.useinitialDelay()default longDeprecated.useinterval()default @NotNull TimeUnitDeprecated.useinterval()longGet the number of times theIntervalTriggershould repeat, after which it will be automatically deleted.@NotNull Duration@NotNull Durationinterval()@NotNull InstantnextTriggerTime(@NotNull Instant time) Calculates the next valid trigger time from a given time and the trigger configurationdefault io.vertx.core.json.JsonObjecttoJson()Serialize this trigger to json object that helps to persist in external systemdefault @NotNull Stringtype()Declares the trigger type@NotNull IntervalTriggervalidate()Do validate trigger in runtime.Methods inherited from interface io.github.zero88.schedulerx.trigger.Trigger
display, preview, preview, ruleMethods 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:HasTriggerTypeDeclares the trigger type- Specified by:
typein interfaceHasTriggerType- Returns:
- the trigger type in string
-
getRepeat
long getRepeat()Get the number of times theIntervalTriggershould 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
IntervalTriggershould 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 theIntervalTriggershould repeat. -
getIntervalTimeUnit
Deprecated.useinterval()Interval time unit- API Note:
- Default is
SECONDS
-
validate
Description copied from interface:TriggerDo validate trigger in runtime. -
toJson
default io.vertx.core.json.JsonObject toJson()Description copied from interface:TriggerSerialize 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()