Examples of ThreadPool


Examples of org.apache.sling.commons.threads.ThreadPool

        final ThreadPoolManager tpm = this.threadPoolManager;
        if ( tpm == null ) {
            final SchedulerFactory factory = new StdSchedulerFactory();
            this.scheduler = factory.getScheduler();
        } else {
            final ThreadPool pool = tpm.get(THREAD_POOL_NAME);
            final QuartzThreadPool quartzPool = new QuartzThreadPool(pool);
            final DirectSchedulerFactory factory = DirectSchedulerFactory.getInstance();
            factory.createScheduler(quartzPool, new RAMJobStore());
            this.scheduler = factory.getScheduler();
        }
View Full Code Here

Examples of org.apache.tomcat.util.threads.ThreadPool

                next=wEnv.getHandler( "dispatch" );
            if( next==null )
                next=wEnv.getHandler( "request" );
        }

        tp=new ThreadPool();
               
        super.initJkComponent();
       
        log.info("JK: listening on unix socket: " + file );
       
View Full Code Here

Examples of org.apache.tomcat.util.threads.ThreadPool

    protected int linger=100;
    protected int socketTimeout=-1;
   
    public PoolTcpEndpoint() {
  //  super("tc_log");  // initialize default logger
  tp = new ThreadPool();
    }
View Full Code Here

Examples of org.apache.tomcat.util.threads.ThreadPool

    protected int linger=100;
    protected int socketTimeout=-1;
   
    public PoolTcpEndpoint() {
  //  super("tc_log");  // initialize default logger
  tp = new ThreadPool();
    }
View Full Code Here

Examples of org.apache.xmlrpc.util.ThreadPool

        MyServletWebServer(HttpServlet pServlet, int pPort)
                throws ServletException {
            super(pServlet, pPort);
        }
        public ThreadPool newThreadPool(){
            pool = new ThreadPool(getXmlRpcServer().getMaxThreads(), "XML-RPC"){
            };
            return pool;
        }
View Full Code Here

Examples of org.codehaus.spice.threadpool.ThreadPool

        final Mock mockHandler = new Mock( RequestHandler.class );
        final RequestHandler handler = (RequestHandler)mockHandler.proxy();

        final Mock mockPool = new Mock( ThreadPool.class );
        mockPool.expectAndReturn( "execute", C.args( C.isA( Runnable.class ) ), control );
        final ThreadPool threadPool = (ThreadPool)mockPool.proxy();

        final ThreadPerRequestHandler requestHandler =
            new ThreadPerRequestHandler( handler, threadPool );
        requestHandler.handleConnection( new Socket() );
View Full Code Here

Examples of org.eclipse.jetty.util.thread.ThreadPool

    }
   
    protected void setupThreadPool() {
        AbstractConnector aconn = (AbstractConnector) connector;
        if (isSetThreadingParameters()) {
            ThreadPool pool = aconn.getThreadPool();
            if (pool == null) {
                pool = aconn.getServer().getThreadPool();
            }
            if (pool == null) {
                pool = new QueuedThreadPool();
                aconn.getServer().setThreadPool(pool);
                aconn.setThreadPool(pool);
            }
            //threads for the acceptors and selectors are taken from
            //the pool so we need to have room for those
            int acc = aconn.getAcceptors() * 2;
            if (getThreadingParameters().isSetMaxThreads()
                && getThreadingParameters().getMaxThreads() <= acc) {
                throw new Fault(new Message("NOT_ENOUGH_THREADS", LOG,
                                            port,
                                            acc + 1,
                                            getThreadingParameters().getMaxThreads(),
                                            acc));
            }
            if (pool instanceof QueuedThreadPool) {
                QueuedThreadPool pl = (QueuedThreadPool)pool;
                if (getThreadingParameters().isSetMinThreads()) {
                    pl.setMinThreads(getThreadingParameters().getMinThreads());
                }
                if (getThreadingParameters().isSetMaxThreads()) {
                    pl.setMaxThreads(getThreadingParameters().getMaxThreads());
                }
            } else {
                try {
                    if (getThreadingParameters().isSetMinThreads()) {
                        pool.getClass().getMethod("setMinThreads", Integer.TYPE)
                            .invoke(pool, getThreadingParameters().getMinThreads());
                    }
                    if (getThreadingParameters().isSetMaxThreads()) {
                        pool.getClass().getMethod("setMaxThreads", Integer.TYPE)
                            .invoke(pool, getThreadingParameters().getMaxThreads());
                    }
                } catch (Throwable t) {
                    //ignore - this won't happen for Jetty 7.1 - 7.2 and 7.3 and newer
                    //will be instanceof QueuedThreadPool above
View Full Code Here

Examples of org.eclipse.jetty.util.thread.ThreadPool

    public static void main(String[] args) throws Exception {
        COUNTER_1.inc();
        COUNTER_2.inc();

        final ThreadPool threadPool = new InstrumentedQueuedThreadPool(REGISTRY);
        final Server server = new Server(threadPool);

        final Connector connector = new ServerConnector(server,
                                                        new InstrumentedConnectionFactory(new HttpConnectionFactory(),
                                                                                          REGISTRY.timer("http.connection")));
View Full Code Here

Examples of org.eclipse.jetty.util.thread.ThreadPool

    }

    @Override
    public Server build(Environment environment) {
        printBanner(environment.getName());
        final ThreadPool threadPool = createThreadPool(environment.metrics());
        final Server server = buildServer(environment.lifecycle(), threadPool);
        final Handler applicationHandler = createAppServlet(server,
                                                            environment.jersey(),
                                                            environment.getObjectMapper(),
                                                            environment.getValidator(),
View Full Code Here

Examples of org.eclipse.jetty.util.thread.ThreadPool

    }

    @Override
    public Server build(Environment environment) {
        printBanner(environment.getName());
        final ThreadPool threadPool = createThreadPool(environment.metrics());
        final Server server = buildServer(environment.lifecycle(), threadPool);

        environment.getApplicationContext().setContextPath(applicationContextPath);
        final Handler applicationHandler = createAppServlet(server,
                                                            environment.jersey(),
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.