java.lang.Object
org.elasticsearch.common.scheduler.SchedulerEngine
Thread-safe scheduling implementation that'll cancel an already scheduled job
before rescheduling.
The scheduler engine offers support for registering listeners that'll get notified
when a job triggers (according to the job's configured schedule)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordIn most cases a Job only requires a `schedule` and an `id`, but an optional `fixedStartTime` can also be used.static interfacestatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(SchedulerEngine.Job job) intjobCount()protected voidnotifyListeners(String name, long triggeredTime, long scheduledTime) voidregister(SchedulerEngine.Listener listener) booleanvoidstart(Collection<SchedulerEngine.Job> jobs) voidstop()voidunregister(SchedulerEngine.Listener listener)
-
Constructor Details
-
SchedulerEngine
-
-
Method Details
-
register
-
unregister
-
start
-
stop
public void stop() -
scheduledJobIds
-
add
-
remove
-
jobCount
public int jobCount()- Returns:
- The number of currently active/triggered jobs
-
notifyListeners
-