Package com.cloud.utils.nio

Examples of com.cloud.utils.nio.NioServer


        _connectExecutor = new ThreadPoolExecutor(100, 500, 60l, TimeUnit.SECONDS,
                new LinkedBlockingQueue<Runnable>(), new NamedThreadFactory("AgentConnectTaskPool"));
        //allow core threads to time out even when there are no items in the queue
        _connectExecutor.allowCoreThreadTimeOut(true);

        _connection = new NioServer("AgentManager", _port, workers + 10, this);
        s_logger.info("Listening on " + _port + " with " + workers + " workers");

        value = configs.get(Config.DirectAgentPoolSize.key());
        int size = NumbersUtil.parseInt(value, 500);
        _directAgentExecutor = new ScheduledThreadPoolExecutor(size, new NamedThreadFactory("DirectAgent"));
View Full Code Here


        s_logger.info("Test");
       
        _testCount = 0;
        _completedCount = 0;
       
        _server = new NioServer("NioTestServer", 7777, 5, new NioTestServer());
        _server.start();
       
        _client = new NioClient("NioTestServer", "127.0.0.1", 7777, 5, new NioTestClient());
        _client.start();
       
View Full Code Here

        _monitor = ComponentLocator.inject(AgentMonitor.class, _nodeId, _hostDao, _vmDao, _dcDao, _podDao, this, _alertMgr, _pingTimeout);
        registerForHostEvents(_monitor, true, true, false);

        _executor = new ThreadPoolExecutor(threads, threads, 60l, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new NamedThreadFactory("AgentTaskPool"));

        _connection = new NioServer("AgentManager", _port, workers + 10, this);

        s_logger.info("Listening on " + _port + " with " + workers + " workers");
        return true;
    }
View Full Code Here

        _connectExecutor = new ThreadPoolExecutor(100, 500, 60l, TimeUnit.SECONDS,
                new LinkedBlockingQueue<Runnable>(), new NamedThreadFactory("AgentConnectTaskPool"));
        //allow core threads to time out even when there are no items in the queue
        _connectExecutor.allowCoreThreadTimeOut(true);

        _connection = new NioServer("AgentManager", _port, workers + 10, this);
        s_logger.info("Listening on " + _port + " with " + workers + " workers");

        value = configs.get(Config.DirectAgentPoolSize.key());
        int size = NumbersUtil.parseInt(value, 500);
        _directAgentExecutor = new ScheduledThreadPoolExecutor(size, new NamedThreadFactory("DirectAgent"));
View Full Code Here

          //launchAgent();

            // FIXME get rid of this approach of agent listening for boot strap commands from the management server

      // now listen for bootstrap request from the management server and launch agents
      _connection = new NioServer("VmmAgentShell", _listenerPort, 1, this);
      _connection.start();
      s_logger.info("SCVMM agent is listening on port " +_listenerPort + " for bootstrap command from management server");
      while(_connection.isRunning());
        } catch(final ConfigurationException e) {
            s_logger.error("Unable to start agent: " + e.getMessage());
View Full Code Here

        s_logger.info("Test");
       
        _testCount = 0;
        _completedCount = 0;
       
        _server = new NioServer("NioTestServer", 7777, 5, new NioTestServer());
        _server.start();
       
        _client = new NioClient("NioTestServer", "127.0.0.1", 7777, 5, new NioTestClient());
        _client.start();
       
View Full Code Here

        _monitor = ComponentLocator.inject(AgentMonitor.class, _nodeId, _hostDao, _vmDao, _dcDao, _podDao, this, _alertMgr, _pingTimeout);
        registerForHostEvents(_monitor, true, true, false);

        _executor = new ThreadPoolExecutor(threads, threads, 60l, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new NamedThreadFactory("AgentTaskPool"));

        _connection = new NioServer("AgentManager", _port, workers + 10, this);

        s_logger.info("Listening on " + _port + " with " + workers + " workers");
        return true;
    }
View Full Code Here

        s_logger.info("Test");

        _testCount = 0;
        _completedCount = 0;

        _server = new NioServer("NioTestServer", 7777, 5, new NioTestServer());
        _server.start();

        _client = new NioClient("NioTestServer", "127.0.0.1", 7777, 5, new NioTestClient());
        _client.start();
View Full Code Here

        _connectExecutor = new ThreadPoolExecutor(100, 500, 60l, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new NamedThreadFactory("AgentConnectTaskPool"));
        //allow core threads to time out even when there are no items in the queue
        _connectExecutor.allowCoreThreadTimeOut(true);

        _connection = new NioServer("AgentManager", Port.value(), Workers.value() + 10, this);
        s_logger.info("Listening on " + Port.value() + " with " + Workers.value() + " workers");

        _directAgentExecutor = new ScheduledThreadPoolExecutor(DirectAgentPoolSize.value(), new NamedThreadFactory("DirectAgent"));
        s_logger.debug("Created DirectAgentAttache pool with size: " + DirectAgentPoolSize.value());
        _directAgentThreadCap = Math.round(DirectAgentPoolSize.value() * DirectAgentThreadCap.value()) + 1; // add 1 to always make the value > 0
View Full Code Here

        _connectExecutor = new ThreadPoolExecutor(100, 500, 60l, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new NamedThreadFactory("AgentConnectTaskPool"));
        //allow core threads to time out even when there are no items in the queue
        _connectExecutor.allowCoreThreadTimeOut(true);

        _connection = new NioServer("AgentManager", Port.value(), Workers.value() + 10, this);
        s_logger.info("Listening on " + Port.value() + " with " + Workers.value() + " workers");

        _directAgentExecutor = new ScheduledThreadPoolExecutor(DirectAgentPoolSize.value(), new NamedThreadFactory("DirectAgent"));
        s_logger.debug("Created DirectAgentAttache pool with size: " + DirectAgentPoolSize.value());
        _directAgentThreadCap = Math.round(DirectAgentPoolSize.value() * DirectAgentThreadCap.value()) + 1; // add 1 to always make the value > 0
View Full Code Here

TOP

Related Classes of com.cloud.utils.nio.NioServer

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.