use of org.apache.nifi.cluster.coordination.heartbeat.ClusterProtocolHeartbeatMonitor in project nifi by apache.
the class HeartbeatMonitorFactoryBean method getObject.
@Override
public HeartbeatMonitor getObject() throws Exception {
if (heartbeatMonitor == null && properties.isNode()) {
final ClusterCoordinationProtocolSenderListener protocolSenderListener = applicationContext.getBean("clusterCoordinationProtocolSenderListener", ClusterCoordinationProtocolSenderListener.class);
final ClusterCoordinator clusterCoordinator = applicationContext.getBean("clusterCoordinator", ClusterCoordinator.class);
heartbeatMonitor = new ClusterProtocolHeartbeatMonitor(clusterCoordinator, protocolSenderListener, properties);
}
return heartbeatMonitor;
}
Aggregations