Search in sources :

Example 1 with LeaderElectionNodeProtocolSender

use of org.apache.nifi.cluster.coordination.node.LeaderElectionNodeProtocolSender in project nifi by apache.

the class Node method createNodeProtocolSender.

@SuppressWarnings("unchecked")
private NodeProtocolSender createNodeProtocolSender() {
    final SocketConfiguration socketConfig = new SocketConfiguration();
    socketConfig.setSocketTimeout(3000);
    socketConfig.setReuseAddress(true);
    final ProtocolContext<ProtocolMessage> protocolContext = new JaxbProtocolContext<>(JaxbProtocolUtils.JAXB_CONTEXT);
    final NodeProtocolSender protocolSender = new LeaderElectionNodeProtocolSender(socketConfig, protocolContext, electionManager);
    return protocolSender;
}
Also used : LeaderElectionNodeProtocolSender(org.apache.nifi.cluster.coordination.node.LeaderElectionNodeProtocolSender) NodeProtocolSender(org.apache.nifi.cluster.protocol.NodeProtocolSender) LeaderElectionNodeProtocolSender(org.apache.nifi.cluster.coordination.node.LeaderElectionNodeProtocolSender) SocketConfiguration(org.apache.nifi.io.socket.SocketConfiguration) ServerSocketConfiguration(org.apache.nifi.io.socket.ServerSocketConfiguration) JaxbProtocolContext(org.apache.nifi.cluster.protocol.jaxb.JaxbProtocolContext) ProtocolMessage(org.apache.nifi.cluster.protocol.message.ProtocolMessage)

Aggregations

LeaderElectionNodeProtocolSender (org.apache.nifi.cluster.coordination.node.LeaderElectionNodeProtocolSender)1 NodeProtocolSender (org.apache.nifi.cluster.protocol.NodeProtocolSender)1 JaxbProtocolContext (org.apache.nifi.cluster.protocol.jaxb.JaxbProtocolContext)1 ProtocolMessage (org.apache.nifi.cluster.protocol.message.ProtocolMessage)1 ServerSocketConfiguration (org.apache.nifi.io.socket.ServerSocketConfiguration)1 SocketConfiguration (org.apache.nifi.io.socket.SocketConfiguration)1