public class UserMetricsTask extends LeadershipTask
Constructor and Description |
---|
UserMetricsTask(io.micrometer.core.instrument.MeterRegistry registry,
JobSearchService jobSearchService,
UserMetricsProperties userMetricsProperties)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Any cleanup that needs to be performed when this task is stopped due to leadership being revoked.
|
long |
getFixedRate()
Get how long the system should wait between invoking the run() method of this task in milliseconds.
|
GenieTaskScheduleType |
getScheduleType()
Get the type of scheduling mechanism which should be used to schedule this task.
|
void |
run() |
getFixedDelay, getTrigger
public UserMetricsTask(io.micrometer.core.instrument.MeterRegistry registry, JobSearchService jobSearchService, UserMetricsProperties userMetricsProperties)
registry
- the metrics registryjobSearchService
- the job search serviceuserMetricsProperties
- the properties that configure this taskpublic GenieTaskScheduleType getScheduleType()
getScheduleType
in class GenieTask
public long getFixedRate()
getFixedRate
in class GenieTask
public void run()
public void cleanup()
cleanup
in class LeadershipTask