public class AgentJobCleanupTask extends LeaderTask
Constructor and Description |
---|
AgentJobCleanupTask(DataServices dataServices,
AgentCleanupProperties properties,
io.micrometer.core.instrument.MeterRegistry registry,
AgentRoutingService agentRoutingService)
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 AgentJobCleanupTask(DataServices dataServices, AgentCleanupProperties properties, io.micrometer.core.instrument.MeterRegistry registry, AgentRoutingService agentRoutingService)
dataServices
- The DataServices
encapsulation instance to useproperties
- the task propertiesregistry
- the metrics registryagentRoutingService
- the agent routing servicepublic void run()
public void cleanup()
cleanup
in class LeaderTask
public GenieTaskScheduleType getScheduleType()
getScheduleType
in class GenieTask
public long getFixedRate()
getFixedRate
in class GenieTask