@Override public int getCompletionIntervalMs() { return m_config.getBatchIntervalMs(); }
@Override public int getCompletionSize() { return m_config.getBatchSize(); }
@Override public int getNumConsumerThreads() { return m_config.getNumThreads(); }
public void start() throws InterruptedException { bossGroup = new NioEventLoopGroup(); workerGroup = new NioEventLoopGroup(); final ServerBootstrap b = new ServerBootstrap(); b.group(bossGroup, workerGroup) .channel(NioServerSocketChannel.class) .option(ChannelOption.SO_BACKLOG, 128) .childOption(ChannelOption.SO_KEEPALIVE, true) .childHandler(new ChannelInitializer<SocketChannel>() { @Override public void initChannel(SocketChannel ch) throws Exception { ch.pipeline().addLast(new LoggingHandler()); ch.pipeline().addLast(new XmlFrameDecoder(2147483647)); ch.pipeline().addLast(new XmlEventProcessor(eventIpcManager)); } }); // Bind and start to accept incoming connections. future = b.bind(config.getTCPIpAddress(), config.getTCPPort()).sync().await(); }
public void start() throws InterruptedException { bossGroup = new NioEventLoopGroup(); final Bootstrap b = new Bootstrap() .group(bossGroup) .channel(NioDatagramChannel.class) .option(ChannelOption.SO_REUSEADDR, true) .option(ChannelOption.SO_RCVBUF, Integer.MAX_VALUE) .handler(new ChannelInitializer<DatagramChannel>() { @Override protected void initChannel(DatagramChannel ch) throws Exception { ch.pipeline().addLast(new LoggingHandler()); ch.pipeline().addLast(new MessageToMessageDecoder<DatagramPacket>() { @Override protected void decode(ChannelHandlerContext ctx, DatagramPacket msg, List<Object> out) throws Exception { msg.retain(); out.add(msg.content()); } }); ch.pipeline().addLast(new XmlFrameDecoder(2147483647)); ch.pipeline().addLast(new XmlEventProcessor(eventIpcManager)); } }); future = b.bind(config.getUDPIpAddress(), config.getUDPPort()).await(); }
@Override public int getQueueSize() { return m_config.getQueueSize(); }
public void start() throws InterruptedException { bossGroup = new NioEventLoopGroup(); workerGroup = new NioEventLoopGroup(); final ServerBootstrap b = new ServerBootstrap(); b.group(bossGroup, workerGroup) .channel(NioServerSocketChannel.class) .option(ChannelOption.SO_BACKLOG, 128) .childOption(ChannelOption.SO_KEEPALIVE, true) .childHandler(new ChannelInitializer<SocketChannel>() { @Override public void initChannel(SocketChannel ch) throws Exception { ch.pipeline().addLast(new LoggingHandler()); ch.pipeline().addLast(new XmlFrameDecoder(2147483647)); ch.pipeline().addLast(new XmlEventProcessor(eventIpcManager)); } }); // Bind and start to accept incoming connections. future = b.bind(config.getTCPIpAddress(), config.getTCPPort()).sync().await(); }
public void start() throws InterruptedException { bossGroup = new NioEventLoopGroup(); final Bootstrap b = new Bootstrap() .group(bossGroup) .channel(NioDatagramChannel.class) .option(ChannelOption.SO_REUSEADDR, true) .option(ChannelOption.SO_RCVBUF, Integer.MAX_VALUE) .handler(new ChannelInitializer<DatagramChannel>() { @Override protected void initChannel(DatagramChannel ch) throws Exception { ch.pipeline().addLast(new LoggingHandler()); ch.pipeline().addLast(new MessageToMessageDecoder<DatagramPacket>() { @Override protected void decode(ChannelHandlerContext ctx, DatagramPacket msg, List<Object> out) throws Exception { msg.retain(); out.add(msg.content()); } }); ch.pipeline().addLast(new XmlFrameDecoder(2147483647)); ch.pipeline().addLast(new XmlEventProcessor(eventIpcManager)); } }); future = b.bind(config.getUDPIpAddress(), config.getUDPPort()).await(); }
@Override public int getQueueSize() { return m_config.getQueueSize(); }
@Override public int getNumConsumerThreads() { return m_config.getNumThreads(); }
@Override public int getCompletionIntervalMs() { return m_config.getBatchIntervalMs(); }
@Override public int getCompletionSize() { return m_config.getBatchSize(); }
@Override public int getNumThreads() { return m_config.getNumThreads(); }
@Override public int getNumThreads() { return m_config.getNumThreads(); }