public class AgentJobCleanupTask extends LeadershipTask
| Constructor and Description |
|---|
AgentJobCleanupTask(JobSearchService jobSearchService,
JobPersistenceService jobPersistenceService,
AgentCleanupProperties properties)
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, getTriggerpublic AgentJobCleanupTask(JobSearchService jobSearchService, JobPersistenceService jobPersistenceService, AgentCleanupProperties properties)
jobSearchService - the job search servicejobPersistenceService - the job persistence serviceproperties - the task propertiespublic void run()
public void cleanup()
cleanup in class LeadershipTaskpublic GenieTaskScheduleType getScheduleType()
getScheduleType in class GenieTaskpublic long getFixedRate()
getFixedRate in class GenieTask