Examples of WorkerPool


Examples of org.jboss.netty.channel.socket.nio.WorkerPool

    protected void setupTCPCommunication() throws Exception {
        if (channelFactory == null) {
            // prefer using explicit configured thread pools
            BossPool bp = configuration.getBossPool();
            WorkerPool wp = configuration.getWorkerPool();

            if (bp == null) {
                // create new pool which we should shutdown when stopping as its not shared
                bossPool = new NettyClientBossPoolBuilder()
                        .withBossCount(configuration.getBossCount())
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.WorkerPool

    protected void setupTCPCommunication() throws Exception {
        if (channelFactory == null) {
            // prefer using explicit configured thread pools
            BossPool bp = configuration.getBossPool();
            WorkerPool wp = configuration.getWorkerPool();

            if (bp == null) {
                // create new pool which we should shutdown when stopping as its not shared
                bossPool = new NettyClientBossPoolBuilder()
                        .withTimer(timer)
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.WorkerPool

    }

    protected void startServerBootstrap() {
        // prefer using explicit configured thread pools
        BossPool bp = configuration.getBossPool();
        WorkerPool wp = configuration.getWorkerPool();

        if (bp == null) {
            // create new pool which we should shutdown when stopping as its not shared
            bossPool = new NettyServerBossPoolBuilder()
                    .withBossCount(configuration.getBossCount())
View Full Code Here

Examples of org.jboss.netty.channel.socket.nio.WorkerPool

    protected void setupTCPCommunication() throws Exception {
        if (channelFactory == null) {
            // prefer using explicit configured thread pools
            BossPool bp = configuration.getBossPool();
            WorkerPool wp = configuration.getWorkerPool();

            if (bp == null) {
                // create new pool which we should shutdown when stopping as its not shared
                bossPool = new NettyClientBossPoolBuilder()
                        .withBossCount(configuration.getBossCount())
View Full Code Here

Examples of org.openstreetmap.osmosis.plugin.elasticsearch.worker.WorkerPool

  public ElasticSearchWriterTask(Endpoint endpoint, Set<AbstractIndexBuilder> indexBuilders, Parameters params) {
    this.endpoint = endpoint;
    this.indexBuilders = indexBuilders;
    this.entityCounter = new EntityCounter();
    this.workerPool = new WorkerPool(endpoint.getEntityDao(), params);
  }
View Full Code Here

Examples of org.xsocket.WorkerPool

    public void testCorePoolSize0() throws Exception {
  
        HttpServer server = new HttpServer(0, new WebHandler(), 0, 40);
        server.start();
       
        WorkerPool pool = ((WorkerPool) server.getWorkerpool());
       

        BlockingConnection bc = new BlockingConnection("localhost", server.getLocalPort());

        bc.write("GET /0123456 HTTP/1.1\r\n"+
                 "Host: localhost:" + server.getLocalPort() + "\r\n"+
                 "User-Agent: xLightweb/2.11\r\n"+
                 "Upgrade: WebSocket\r\n"+
                 "Connection: Upgrade\r\n"+
                 "Origin: http://localhost:5161/\r\n"+
                 "\r\n");

        System.out.println(bc.readStringByDelimiter("\r\n\r\n"));
       
        for (int i = 0; i < 10; i++) {
            bc.write(new byte[] { 0x00, 0x48, 0x65, (byte) 0xFF});

            byte[] b = bc.readBytesByLength(4);
            Assert.assertArrayEquals(new byte[] { 0x00, 0x48, 0x65, (byte) 0xFF}, b);
           
            QAUtil.sleep(250);
        }

       
        System.out.println(pool.getLargestPoolSize());
       
        bc.close();
        server.close();
    }    
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.