Package io.netty.util.concurrent

Examples of io.netty.util.concurrent.DefaultEventExecutorGroup


      port++;
    }
    logger.debug("Found free port {}.", port);

    // configure the thread handling internally, callback can be blocking
    eventExecutorGroup = new DefaultEventExecutorGroup(H2HConstants.NUM_OF_NETWORK_THREADS);

    ChannelClientConfiguration clientConfig = PeerMaker.createDefaultChannelClientConfiguration();
    clientConfig.signatureFactory(new H2HSignatureFactory());
    clientConfig.pipelineFilter(new PeerMaker.EventExecutorGroupFilter(eventExecutorGroup));
View Full Code Here


            if (notificationSocketBinding != null) {
                simplePushConfig.endpointHost(notificationSocketBinding.getSocketAddress().getHostName());
                simplePushConfig.endpointPort(notificationSocketBinding.getPort());
            }

            final DefaultEventExecutorGroup reaperExcutorGroup = new DefaultEventExecutorGroup(1);
            final DataStore datastore = injectedDataStore.getValue();
            final SimplePushServerConfig simplePushServerConfig = simplePushConfig.build();
            final ServerBootstrap serverBootstrap = new ServerBootstrap()
                .group(new NioEventLoopGroup(), new NioEventLoopGroup())
                .channel(NioServerSocketChannel.class)
View Full Code Here

            if (notificationSocketBinding != null) {
                simplePushConfig.endpointHost(notificationSocketBinding.getSocketAddress().getHostName());
                simplePushConfig.endpointPort(notificationSocketBinding.getPort());
            }

            final DefaultEventExecutorGroup reaperExcutorGroup = new DefaultEventExecutorGroup(1);
            final DataStore datastore = injectedDataStore.getValue();
            final SimplePushServerConfig simplePushServerConfig = simplePushConfig.build();
            final ServerBootstrap serverBootstrap = new ServerBootstrap()
                .group(new NioEventLoopGroup(), new NioEventLoopGroup())
                .channel(NioServerSocketChannel.class)
View Full Code Here

    handlerToUseExecutionGroup =
        NETTY_CLIENT_EXECUTION_AFTER_HANDLER.get(conf);
    useExecutionGroup = NETTY_CLIENT_USE_EXECUTION_HANDLER.get(conf);
    if (useExecutionGroup) {
      int executionThreads = NETTY_CLIENT_EXECUTION_THREADS.get(conf);
      executionGroup = new DefaultEventExecutorGroup(executionThreads,
          ThreadUtils.createThreadFactory(
              "netty-client-exec-%d", exceptionHandler));
      if (LOG.isInfoEnabled()) {
        LOG.info("NettyClient: Using execution handler with " +
            executionThreads + " threads after " +
View Full Code Here

        GiraphConstants.NETTY_SERVER_EXECUTION_AFTER_HANDLER.get(conf);
    useExecutionGroup =
        GiraphConstants.NETTY_SERVER_USE_EXECUTION_HANDLER.get(conf);
    if (useExecutionGroup) {
      int executionThreads = conf.getNettyServerExecutionThreads();
      executionGroup = new DefaultEventExecutorGroup(executionThreads,
          ThreadUtils.createThreadFactory(
              "netty-server-exec-%d", exceptionHandler));
      if (LOG.isInfoEnabled()) {
        LOG.info("NettyServer: Using execution group with " +
            executionThreads + " threads for " +
View Full Code Here

        synchronized (this.sync) {
            if (this.active) {
                return;
            }
            state = STATUS_STARTING;
            executor = new DefaultEventExecutorGroup(4);
            handler = new StandbyClientHandler(this.store, executor, this.observer);
            group = new NioEventLoopGroup();

            b = new Bootstrap();
            b.group(group);
View Full Code Here

        log.debug("updating current head to " + head);
        ctx.pipeline().remove(RecordIdDecoder.class);
        ctx.pipeline().remove(this);
        ctx.pipeline().addLast(new SegmentDecoder(store));

        preloaderExecutor = new DefaultEventExecutorGroup(4);
        SegmentPreLoaderHandler h1 = new SegmentPreLoaderHandler();
        ctx.pipeline().addLast(preloaderExecutor, h1);

        loaderExecutor = new DefaultEventExecutorGroup(4);
        SegmentLoaderHandler h2 = new SegmentLoaderHandler(store, head,
                preloaderExecutor, loaderExecutor, this.observer.getID());
        ctx.pipeline().addLast(loaderExecutor, h2);

        h1.channelActive(ctx);
View Full Code Here

    }


    @Override
    public void start() {
        this.defaultEventExecutorGroup = new DefaultEventExecutorGroup(//
            nettyServerConfig.getServerWorkerThreads(), //
            new ThreadFactory() {

                private AtomicInteger threadIndex = new AtomicInteger(0);
View Full Code Here

    }


    @Override
    public void start() {
        this.defaultEventExecutorGroup = new DefaultEventExecutorGroup(//
            nettyClientConfig.getClientWorkerThreads(), //
            new ThreadFactory() {

                private AtomicInteger threadIndex = new AtomicInteger(0);
View Full Code Here

    }


    @Override
    public void start() {
        this.defaultEventExecutorGroup = new DefaultEventExecutorGroup(//
            nettyServerConfig.getServerWorkerThreads(), //
            new ThreadFactory() {

                private AtomicInteger threadIndex = new AtomicInteger(0);
View Full Code Here

TOP

Related Classes of io.netty.util.concurrent.DefaultEventExecutorGroup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.