Class UserMetricsTask
java.lang.Object
com.netflix.genie.web.tasks.GenieTask
com.netflix.genie.web.tasks.leader.LeaderTask
com.netflix.genie.web.tasks.leader.UserMetricsTask
- All Implemented Interfaces:
Runnable
A task which publishes user metrics.
- Since:
- 4.0.0
-
Constructor Summary
ConstructorDescriptionUserMetricsTask
(io.micrometer.core.instrument.MeterRegistry registry, DataServices dataServices, UserMetricsProperties userMetricsProperties) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
Any cleanup that needs to be performed when this task is stopped due to leadership being revoked.long
Get how long the system should wait between invoking the run() method of this task in milliseconds.Get the type of scheduling mechanism which should be used to schedule this task.void
run()
Methods inherited from class com.netflix.genie.web.tasks.GenieTask
getFixedDelay, getTrigger
-
Constructor Details
-
UserMetricsTask
public UserMetricsTask(io.micrometer.core.instrument.MeterRegistry registry, DataServices dataServices, UserMetricsProperties userMetricsProperties) Constructor.- Parameters:
registry
- the metrics registrydataServices
- TheDataServices
instance to useuserMetricsProperties
- the properties that configure this task
-
-
Method Details
-
getScheduleType
Get the type of scheduling mechanism which should be used to schedule this task.- Specified by:
getScheduleType
in classGenieTask
- Returns:
- The schedule type
-
getFixedRate
public long getFixedRate()Get how long the system should wait between invoking the run() method of this task in milliseconds.- Overrides:
getFixedRate
in classGenieTask
- Returns:
- The period to wait between invocations of run for this task
-
run
public void run() -
cleanup
public void cleanup()Any cleanup that needs to be performed when this task is stopped due to leadership being revoked.- Overrides:
cleanup
in classLeaderTask
-