public class AgentJobCleanupTask extends LeadershipTask
Constructor and Description |
---|
AgentJobCleanupTask(JobSearchService jobSearchService,
JobPersistenceService jobPersistenceService,
AgentCleanupProperties properties,
io.micrometer.core.instrument.MeterRegistry registry)
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(JobSearchService jobSearchService, JobPersistenceService jobPersistenceService, AgentCleanupProperties properties, io.micrometer.core.instrument.MeterRegistry registry)
jobSearchService
- the job search servicejobPersistenceService
- the job persistence serviceproperties
- the task propertiesregistry
- the metrics registrypublic void run()
public void cleanup()
cleanup
in class LeadershipTask
public GenieTaskScheduleType getScheduleType()
getScheduleType
in class GenieTask
public long getFixedRate()
getFixedRate
in class GenieTask