Class AgentJobCleanupTask
- java.lang.Object
-
- com.netflix.genie.web.tasks.GenieTask
-
- com.netflix.genie.web.tasks.leader.LeaderTask
-
- com.netflix.genie.web.tasks.leader.AgentJobCleanupTask
-
- All Implemented Interfaces:
java.lang.Runnable
public class AgentJobCleanupTask extends LeaderTask
Leader task that cleans up jobs whose agent crashed or disconnected.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description AgentJobCleanupTask(DataServices dataServices, AgentCleanupProperties properties, io.micrometer.core.instrument.MeterRegistry registry, AgentRoutingService agentRoutingService)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanup()Any cleanup that needs to be performed when this task is stopped due to leadership being revoked.longgetFixedRate()Get how long the system should wait between invoking the run() method of this task in milliseconds.GenieTaskScheduleTypegetScheduleType()Get the type of scheduling mechanism which should be used to schedule this task.voidrun()-
Methods inherited from class com.netflix.genie.web.tasks.GenieTask
getFixedDelay, getTrigger
-
-
-
-
Constructor Detail
-
AgentJobCleanupTask
public AgentJobCleanupTask(DataServices dataServices, AgentCleanupProperties properties, io.micrometer.core.instrument.MeterRegistry registry, AgentRoutingService agentRoutingService)
Constructor.- Parameters:
dataServices- TheDataServicesencapsulation instance to useproperties- the task propertiesregistry- the metrics registryagentRoutingService- the agent routing service
-
-
Method Detail
-
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:
cleanupin classLeaderTask
-
getScheduleType
public GenieTaskScheduleType getScheduleType()
Get the type of scheduling mechanism which should be used to schedule this task.- Specified by:
getScheduleTypein 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:
getFixedRatein classGenieTask- Returns:
- The period to wait between invocations of run for this task
-
-