Examples of QueuedThreadPool


Examples of org.mortbay.thread.QueuedThreadPool

        _idleTimeoutQ.setDuration(_idleTimeout);
        _idleTimeoutQ.setNow();

        if(_threadPool==null)
        {
            QueuedThreadPool pool = new QueuedThreadPool();
            pool.setMaxThreads(16);
            pool.setDaemon(true);
            pool.setName("HttpClient");
            _threadPool=pool;
        }

        if (_threadPool instanceof LifeCycle)
        {
View Full Code Here

Examples of org.mortbay.thread.QueuedThreadPool

     *            True if message delivery will be synchronized on the client.
     */
    public BayeuxService(Bayeux bayeux, String name, int maxThreads, boolean synchronous)
    {
        if (maxThreads > 0)
            setThreadPool(new QueuedThreadPool(maxThreads));
        _name=name;
        _bayeux=bayeux;
        _client=_bayeux.newClient(name);
        _listener=(synchronous)?new SyncListen():new AsyncListen();
        _client.addListener(_listener);
View Full Code Here

Examples of org.mortbay.thread.QueuedThreadPool

        _httpClient = new HttpClient();
        _httpClient.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL);
        _httpClient.setMaxConnectionsPerAddress(40000);

        QueuedThreadPool pool = new QueuedThreadPool();
        pool.setMaxThreads(500);
        pool.setMinThreads(200);
        pool.setDaemon(true);
        _httpClient.setThreadPool(pool);
        _httpClient.start();

        Address address = new Address (host,port);
       
View Full Code Here

Examples of org.mortbay.thread.QueuedThreadPool

    {
        String base=".";
       
        // Manually contruct context to avoid hassles with webapp classloaders for now.
        Server server = new Server();
        QueuedThreadPool qtp = new QueuedThreadPool();
        qtp.setMinThreads(5);
        qtp.setMaxThreads(200);
        server.setThreadPool(qtp);
       
        SelectChannelConnector connector=new SelectChannelConnector();
        // SocketConnector connector=new SocketConnector();
        connector.setPort(port);
View Full Code Here

Examples of org.mortbay.thread.QueuedThreadPool

    {       
        Log.info("{} {}", getClass().getSimpleName(), "starting chat client.");
       
        if(_threadPool==null)
        {
            _threadPool = new QueuedThreadPool();
            _threadPool.setMaxThreads(16);
            _threadPool.setDaemon(true);
            _threadPool.setName(getClass().getSimpleName());
            _threadPool.start();
        }       
View Full Code Here

Examples of org.mortbay.thread.QueuedThreadPool

        String jetty_default=new java.io.File("./start.jar").exists()?".":"../..";;
        String jetty_home = System.getProperty("jetty.home",jetty_default);
       
        Server server = new Server();
       
        QueuedThreadPool threadPool = new QueuedThreadPool();
        threadPool.setMaxThreads(100);
        server.setThreadPool(threadPool);
            
        SelectChannelConnector connector=new SelectChannelConnector();
        connector.setPort(8080);
        connector.setMaxIdleTime(30000);
View Full Code Here

Examples of org.mortbay.thread.QueuedThreadPool

            catch (Throwable e) {mex.add(e);}
        }
       
        if (_threadPool==null)
        {
            QueuedThreadPool tp=new QueuedThreadPool();
            setThreadPool(tp);
        }
       
        if (_sessionIdManager!=null)
            _sessionIdManager.start();
View Full Code Here

Examples of org.mortbay.thread.QueuedThreadPool

    int lowThreads = 0;

    public void setUp()
        throws Exception
    {
        _queuedThreadPool = new QueuedThreadPool();
        _queuedThreadPool.setMinThreads( maxThreads );
        _queuedThreadPool.setLowThreads( lowThreads );
        _server.setThreadPool( _queuedThreadPool );

        _handler = new RewriteHandler();
View Full Code Here

Examples of org.mortbay.thread.QueuedThreadPool

        try {
            SelectChannelConnector connector = new SelectChannelConnector();
            connector.setLowResourceMaxIdleTime(3000);
            connector.setPort(this.port);
            connector.setReuseAddress(true);
            QueuedThreadPool threadPool = new QueuedThreadPool();
            threadPool.setName("VoldemortHttp");
            threadPool.setMaxThreads(this.numberOfThreads);
            Server httpServer = new Server();
            httpServer.setConnectors(new Connector[] { connector });
            httpServer.setThreadPool(threadPool);
            httpServer.setSendServerVersion(false);
            httpServer.setSendDateHeader(false);
View Full Code Here

Examples of org.mortbay.thread.QueuedThreadPool

    webServer.addConnector(listener);

    int maxThreads = conf.getInt(HTTP_MAX_THREADS, -1);
    // If HTTP_MAX_THREADS is not configured, QueueThreadPool() will use the
    // default value (currently 254).
    QueuedThreadPool threadPool = maxThreads == -1 ?
        new QueuedThreadPool() : new QueuedThreadPool(maxThreads);
    webServer.setThreadPool(threadPool);

    final String appDir = getWebAppsPath();
    ContextHandlerCollection contexts = new ContextHandlerCollection();
    webServer.setHandler(contexts);
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.