Package org.jboss.netty.buffer

Examples of org.jboss.netty.buffer.DirectChannelBufferFactory


    ExecutorService serverWorkerExecutor = createExecutorService(serverWorkerThreadPoolSize,
                                                                 "router-server-worker-thread-%d");
    serverBootstrap = new ServerBootstrap(
      new NioServerSocketChannelFactory(serverBossExecutor, serverWorkerExecutor));
    serverBootstrap.setOption("backlog", serverConnectionBacklog);
    serverBootstrap.setOption("child.bufferFactory", new DirectChannelBufferFactory());

    // Setup the pipeline factory
    serverBootstrap.setPipelineFactory(
      new ChannelPipelineFactory() {
        @Override
View Full Code Here


        pipeline.addLast("request-encoder", new HttpRequestEncoder());
        return pipeline;
      }
    });

    clientBootstrap.setOption("bufferFactory", new DirectChannelBufferFactory());
  }
View Full Code Here

    private final AtomicInteger returns = new AtomicInteger(0); // buffer objects returned (timed/reset)
    private final AtomicInteger sleeps = new AtomicInteger(0); // threshold induced sleeps (timed/reset)
    private final AtomicInteger leaseOut = new AtomicInteger(0); // outstanding leased buffers

    BufferAllocator() {
        bufferFactory = DIRECT ? new DirectChannelBufferFactory() : new HeapChannelBufferFactory();
        pools = new SizedPool[24];
        // init pools
        int size = BASE_SIZE;
        for (int i = 0; i < pools.length; i++) {
            pools[i] = new SizedPool(size);
View Full Code Here

TOP

Related Classes of org.jboss.netty.buffer.DirectChannelBufferFactory

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.