Class CrowdClusterNodeHeartbeatService
java.lang.Object
com.atlassian.beehive.db.AbstractClusterNodeHeartbeatService
com.atlassian.crowd.manager.cluster.heartbeat.CrowdClusterNodeHeartbeatService
- All Implemented Interfaces:
ClusterNodeHeartbeatService
,ClusterHeartbeatService
,com.atlassian.scheduler.JobRunner
public class CrowdClusterNodeHeartbeatService
extends AbstractClusterNodeHeartbeatService
implements ClusterHeartbeatService, com.atlassian.scheduler.JobRunner
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCrowdClusterNodeHeartbeatService
(ClusterHeartbeatManager clusterNodeHeartBeatDao, com.atlassian.scheduler.SchedulerService localScheduler, com.atlassian.scheduler.SchedulerService clusterwideScheduler, com.atlassian.event.api.EventPublisher eventPublisher, Supplier<Long> timestampSupplier) -
Method Summary
Modifier and TypeMethodDescriptionvoid
onApplicationStarted
(com.atlassian.config.lifecycle.events.ApplicationStartedEvent applicationStartedEvent) void
onXMLRestore
(XMLRestoreFinishedEvent restoreFinishedEvent) void
com.atlassian.scheduler.JobRunnerResponse
runJob
(com.atlassian.scheduler.JobRunnerRequest request) void
Methods inherited from class com.atlassian.beehive.db.AbstractClusterNodeHeartbeatService
findLiveNodes, findLiveNodes, getLastHeartbeatTime, getNodeId, isNodeLive, newHeartbeatJobRunner, startHeartbeat
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.beehive.db.ClusterNodeHeartbeatService
findLiveNodes, findLiveNodes, getLastHeartbeatTime, getNodeId, isNodeLive
-
Field Details
-
NODE_LIVENESS_TIMEOUT
-
-
Constructor Details
-
CrowdClusterNodeHeartbeatService
public CrowdClusterNodeHeartbeatService(ClusterHeartbeatManager clusterNodeHeartBeatDao, com.atlassian.scheduler.SchedulerService localScheduler, com.atlassian.scheduler.SchedulerService clusterwideScheduler, com.atlassian.event.api.EventPublisher eventPublisher, Supplier<Long> timestampSupplier)
-
-
Method Details
-
registerListener
@PostConstruct public void registerListener() -
unregisterListener
@PreDestroy public void unregisterListener() -
onApplicationStarted
@EventListener public void onApplicationStarted(com.atlassian.config.lifecycle.events.ApplicationStartedEvent applicationStartedEvent) -
onXMLRestore
-
getNodeHearbeats
- Specified by:
getNodeHearbeats
in interfaceClusterHeartbeatService
- Returns:
- a list of nodes that have reported a hearbeat recently
-
runJob
@Nullable public com.atlassian.scheduler.JobRunnerResponse runJob(com.atlassian.scheduler.JobRunnerRequest request) - Specified by:
runJob
in interfacecom.atlassian.scheduler.JobRunner
-