Search in sources :

Example 1 with StandardClusterCoordinationProtocolSender

use of org.apache.nifi.cluster.protocol.impl.StandardClusterCoordinationProtocolSender in project nifi by apache.

the class Node method createCoordinatorProtocolSender.

@SuppressWarnings("unchecked")
private ClusterCoordinationProtocolSender createCoordinatorProtocolSender() {
    final SocketConfiguration socketConfig = new SocketConfiguration();
    socketConfig.setSocketTimeout(3000);
    socketConfig.setReuseAddress(true);
    final ProtocolContext<ProtocolMessage> protocolContext = new JaxbProtocolContext<>(JaxbProtocolUtils.JAXB_CONTEXT);
    return new StandardClusterCoordinationProtocolSender(socketConfig, protocolContext, 1);
}
Also used : StandardClusterCoordinationProtocolSender(org.apache.nifi.cluster.protocol.impl.StandardClusterCoordinationProtocolSender) 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

StandardClusterCoordinationProtocolSender (org.apache.nifi.cluster.protocol.impl.StandardClusterCoordinationProtocolSender)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