Search in sources :

Example 1 with ClusterProtocolHeartbeatMonitor

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;
}
Also used : ClusterProtocolHeartbeatMonitor(org.apache.nifi.cluster.coordination.heartbeat.ClusterProtocolHeartbeatMonitor) ClusterCoordinator(org.apache.nifi.cluster.coordination.ClusterCoordinator) ClusterCoordinationProtocolSenderListener(org.apache.nifi.cluster.protocol.impl.ClusterCoordinationProtocolSenderListener)

Aggregations

ClusterCoordinator (org.apache.nifi.cluster.coordination.ClusterCoordinator)1 ClusterProtocolHeartbeatMonitor (org.apache.nifi.cluster.coordination.heartbeat.ClusterProtocolHeartbeatMonitor)1 ClusterCoordinationProtocolSenderListener (org.apache.nifi.cluster.protocol.impl.ClusterCoordinationProtocolSenderListener)1