Package reactor.support

Examples of reactor.support.NamedDaemonThreadFactory


    }
    if (null != nettyOptions && null != nettyOptions.eventLoopGroup()) {
      this.ioGroup = nettyOptions.eventLoopGroup();
    } else {
      int ioThreadCount = env.getProperty("reactor.tcp.ioThreadCount", Integer.class, Environment.PROCESSORS);
      this.ioGroup = new NioEventLoopGroup(ioThreadCount, new NamedDaemonThreadFactory("reactor-tcp-io"));
    }

    this.bootstrap = new Bootstrap()
        .group(ioGroup)
        .channel(NioSocketChannel.class)
View Full Code Here


    }

    int selectThreadCount = env.getProperty("reactor.tcp.selectThreadCount", Integer.class,
                                            Environment.PROCESSORS / 2);
    int ioThreadCount = env.getProperty("reactor.tcp.ioThreadCount", Integer.class, Environment.PROCESSORS);
    this.selectorGroup = new NioEventLoopGroup(selectThreadCount, new NamedDaemonThreadFactory("reactor-tcp-select"));
    if (null != nettyOptions && null != nettyOptions.eventLoopGroup()) {
      this.ioGroup = nettyOptions.eventLoopGroup();
    } else {
      this.ioGroup = new NioEventLoopGroup(ioThreadCount, new NamedDaemonThreadFactory("reactor-tcp-io"));
    }

    this.bootstrap = new ServerBootstrap()
        .group(selectorGroup, ioGroup)
        .channel(NioServerSocketChannel.class)
View Full Code Here

      this.ioGroup = nettyOptions.eventLoopGroup();
    } else {
      int ioThreadCount = env.getProperty("reactor.udp.ioThreadCount",
                                          Integer.class,
                                          Environment.PROCESSORS);
      this.ioGroup = new NioEventLoopGroup(ioThreadCount, new NamedDaemonThreadFactory("reactor-udp-io"));
    }

    final NettyNetChannelInboundHandler inboundHandler = new NettyNetChannelInboundHandler() {
      @Override
      public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
View Full Code Here

   *     the resolution of this timer, in milliseconds
   */
  public SimpleHashWheelTimer(final int resolution) {
    this.resolution = resolution;

    this.loop = new NamedDaemonThreadFactory("simple-hash-wheel-timer").newThread(
        new Runnable() {
          @Override
          public void run() {
            while(!Thread.currentThread().isInterrupted()) {
              long now = now(resolution);
View Full Code Here

        return new ConcurrentSkipListSet<TimerRegistration>();
      }
    }, wheelSize);

    this.resolution = res;
    this.loop = new NamedDaemonThreadFactory(name).newThread(new Runnable() {
      @Override
      public void run() {
        long deadline = System.currentTimeMillis();

        while(true) {
View Full Code Here

    assertTrue(server.getClass().getSimpleName() + " was started", server.shutdown().await(1, TimeUnit.SECONDS));
  }

  @Before
  public void setup() {
    clientPool = Executors.newCachedThreadPool(new NamedDaemonThreadFactory(getClass().getSimpleName() + "-server"));
    serverPool = Executors.newCachedThreadPool(new NamedDaemonThreadFactory(getClass().getSimpleName() + "-client"));

    env1 = new Environment();
    env2 = new Environment();

    port = SocketUtils.findAvailableTcpPort();
View Full Code Here

               throw new IllegalArgumentException(e.getMessage(), e);
             }
           });
    }

    threadPool = Executors.newCachedThreadPool(new NamedDaemonThreadFactory("benchmark-writers"));
    syncLog = (Logger) LoggerFactory.getLogger("sync");
    asyncLog = (Logger) LoggerFactory.getLogger("async");
    chronicleLog = (Logger) LoggerFactory.getLogger("chronicle");
  }
View Full Code Here

                             final ExceptionHandler errorHandler,
                             ProducerType producerType,
                             WaitStrategy waitStrategy,
                             ExecutorService executor) {
    if(null == executor) {
      this.executor = Executors.newFixedThreadPool(eventThreads, new NamedDaemonThreadFactory(name));
      this.shutdownExecutor = true;
    } else {
      this.executor = executor;
      this.shutdownExecutor = false;
    }
View Full Code Here

        poolSize,
        poolSize,
        0L,
        TimeUnit.MILLISECONDS,
        workQueue,
        new NamedDaemonThreadFactory(threadName, getContext()),
        rejectedExecutionHandler
    );
  }
View Full Code Here

      this.waitingMood = (WaitingMood) waitStrategy;
    } else {
      this.waitingMood = null;
    }

    this.executor = Executors.newSingleThreadExecutor(new NamedDaemonThreadFactory(name, getContext()));
    this.disruptor = new Disruptor<RingBufferTask>(
        new EventFactory<RingBufferTask>() {
          @Override
          public RingBufferTask newInstance() {
            return new RingBufferTask();
View Full Code Here

TOP

Related Classes of reactor.support.NamedDaemonThreadFactory

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.