public class ClusterCheckerTask extends LeadershipTask
| Constructor and Description |
|---|
ClusterCheckerTask(@NotNull GenieHostInfo genieHostInfo,
@NotNull ClusterCheckerProperties properties,
@NotNull JobSearchService jobSearchService,
@NotNull JobPersistenceService jobPersistenceService,
@NotNull AgentConnectionPersistenceService agentConnectionPersistenceService,
@NotNull org.springframework.web.client.RestTemplate restTemplate,
@NotNull org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties webEndpointProperties,
@NotNull 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()
Ping the health check endpoint of all other nodes which have running jobs.
|
getFixedDelay, getTriggerpublic ClusterCheckerTask(@NotNull
@NotNull GenieHostInfo genieHostInfo,
@NotNull
@NotNull ClusterCheckerProperties properties,
@NotNull
@NotNull JobSearchService jobSearchService,
@NotNull
@NotNull JobPersistenceService jobPersistenceService,
@NotNull
@NotNull AgentConnectionPersistenceService agentConnectionPersistenceService,
@NotNull
@NotNull org.springframework.web.client.RestTemplate restTemplate,
@NotNull
@NotNull org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties webEndpointProperties,
@NotNull
@NotNull io.micrometer.core.instrument.MeterRegistry registry)
genieHostInfo - Information about the host this Genie process is running onproperties - The properties to use to configure the taskjobSearchService - The job search service to usejobPersistenceService - The job persistence service to useagentConnectionPersistenceService - The agent connections persistence servicerestTemplate - The rest template for http callswebEndpointProperties - The properties where Spring actuator is runningregistry - The spectator registry for getting metricspublic void run()
public GenieTaskScheduleType getScheduleType()
getScheduleType in class GenieTaskpublic long getFixedRate()
getFixedRate in class GenieTaskpublic void cleanup()
cleanup in class LeadershipTask