Search in sources :

Example 1 with RaftMessageEncoder

use of org.neo4j.causalclustering.messaging.marshalling.RaftMessageEncoder in project neo4j by neo4j.

the class RaftChannelInitializer method initChannel.

@Override
protected void initChannel(SocketChannel ch) throws Exception {
    ChannelPipeline pipeline = ch.pipeline();
    pipeline.addLast("frameEncoder", new LengthFieldPrepender(4));
    pipeline.addLast(new VersionPrepender());
    pipeline.addLast("raftMessageEncoder", new RaftMessageEncoder(marshal));
    pipeline.addLast(new ExceptionLoggingHandler(log));
    pipeline.addLast(new ExceptionMonitoringHandler(monitors.newMonitor(ExceptionMonitoringHandler.Monitor.class, SenderService.class)));
    pipeline.addLast(new ExceptionSwallowingHandler());
}
Also used : RaftMessageEncoder(org.neo4j.causalclustering.messaging.marshalling.RaftMessageEncoder) ExceptionSwallowingHandler(org.neo4j.causalclustering.handlers.ExceptionSwallowingHandler) ExceptionLoggingHandler(org.neo4j.causalclustering.handlers.ExceptionLoggingHandler) VersionPrepender(org.neo4j.causalclustering.VersionPrepender) LengthFieldPrepender(io.netty.handler.codec.LengthFieldPrepender) ChannelPipeline(io.netty.channel.ChannelPipeline) ExceptionMonitoringHandler(org.neo4j.causalclustering.handlers.ExceptionMonitoringHandler)

Aggregations

ChannelPipeline (io.netty.channel.ChannelPipeline)1 LengthFieldPrepender (io.netty.handler.codec.LengthFieldPrepender)1 VersionPrepender (org.neo4j.causalclustering.VersionPrepender)1 ExceptionLoggingHandler (org.neo4j.causalclustering.handlers.ExceptionLoggingHandler)1 ExceptionMonitoringHandler (org.neo4j.causalclustering.handlers.ExceptionMonitoringHandler)1 ExceptionSwallowingHandler (org.neo4j.causalclustering.handlers.ExceptionSwallowingHandler)1 RaftMessageEncoder (org.neo4j.causalclustering.messaging.marshalling.RaftMessageEncoder)1