Examples of ThreadPool


Examples of com.sun.grizzly.config.dom.ThreadPool

                    listener.setName(listenerName);
                    listener.setPort(Integer.toString(portNumber));
                    listener.setProtocol(listenerName);
                    listener.setThreadPool("http-thread-pool");
                    if (listener.findThreadPool() == null) {
                        final ThreadPool pool = nls.createChild(ThreadPool.class);
                        pool.setName(listenerName);
                        listener.setThreadPool(listenerName);
                    }
                    listener.setTransport("tcp");
                    if (listener.findTransport() == null) {
                        final Transport transport = transports.createChild(Transport.class);
View Full Code Here

Examples of com.workplacesystems.utilsj.threadpool.ThreadPool

                public String getThreadPoolName() {
                    return "EventPool";
                }
            };
            event_callback_pool = new ThreadPool(tp_creator.getThreadObjectFactory(), tp_creator.getThreadPoolConfig());
        }
View Full Code Here

Examples of jnode.main.threads.ThreadPool

    new InstallUtil();

    int nThreads = 2 + MainHandler.getCurrentInstance().getIntegerProperty(
        BINKD_THREADS, 10);
    new ThreadPool(nThreads);

    // eof
    ThreadPool.execute(new BinkpAsyncServer());

    ThreadPool.execute(new BinkpAsyncClientPool());
View Full Code Here

Examples of net.floodlightcontroller.threadpool.ThreadPool

                new ArrayList<IStoreClient<String,String>>();
        ArrayList<Short> nodeIds = new ArrayList<Short>();
        ArrayList<Node> nodes = new ArrayList<Node>();
       
        FloodlightModuleContext fmc = new FloodlightModuleContext();
        ThreadPool tp = new ThreadPool();

        int curPort = 6699;
       
        String keyStorePath = new File(dbFolder.getRoot(),
                                       "keystore.jceks").getAbsolutePath();
        String keyStorePassword = "bootstrapping is fun!";
        CryptoUtil.writeSharedSecret(keyStorePath,
                                     keyStorePassword,
                                     CryptoUtil.secureRandom(16));
       
        // autobootstrap a cluster of 4 nodes
        for (int i = 0; i < 4; i++) {
            SyncManager syncManager = new SyncManager();
            syncManagers.add(syncManager);

            fmc.addService(IThreadPoolService.class, tp);
            fmc.addService(IDebugCounterService.class, new NullDebugCounter());
            String dbPath =
                    new File(dbFolder.getRoot(),
                             "server" + i).getAbsolutePath();
            fmc.addConfigParam(syncManager, "dbPath", dbPath);

            tp.init(fmc);
            syncManager.init(fmc);
            tp.startUp(fmc);
            syncManager.startUp(fmc);
            syncManager.registerStore("localTestStore", Scope.LOCAL);
            syncManager.registerStore("globalTestStore", Scope.GLOBAL);
           
            IStoreClient<String, String> unsyncStore =
View Full Code Here

Examples of net.sf.antcontrib.util.ThreadPool

        this.maxThreads = 5;
    }

    private void executeParallel(Vector tasks)
    {
        ThreadPool pool = new ThreadPool(maxThreads);
        Enumeration e = tasks.elements();
        Runnable r = null;
        Vector threads = new Vector();

        // start each task in it's own thread, using the
        // pool to ensure that we don't exceed the maximum
        // amount of threads
        while (e.hasMoreElements())
        {
            // Create the Runnable object
            final Task task = (Task)e.nextElement();
            r = new Runnable()
            {
                public void run()
                {
                    task.execute();
                }
            };

            // Get a thread, and start the task.
            // If there is no thread available, this will
            // block until one becomes available
            try
            {
                ThreadPoolThread tpt = pool.borrowThread();
                tpt.setRunnable(r);
                tpt.start();
                threads.addElement(tpt);
            }
            catch (Exception ex)
View Full Code Here

Examples of net.wimpi.modbus.util.ThreadPool

   *
   * @param poolsize the size of the <tt>ThreadPool</tt> used to handle
   *        incoming requests.
   */
  public ModbusTCPListener(int poolsize) {
    m_ThreadPool = new ThreadPool(poolsize);
    try {
      m_Address = InetAddress.getLocalHost();
    } catch (UnknownHostException ex) {

    }
View Full Code Here

Examples of net.wimpi.modbusme.util.ThreadPool

   *
   * @param poolsize the size of the <tt>ThreadPool</tt> used to handle
   *        incoming requests.
   */
  public ModbusTCPListener(int poolsize) {
    m_ThreadPool = new ThreadPool(poolsize);
    //FPFtry {
      m_Address = ""/*FPFInetAddress.getLocalHost()*/;
    //FPF} catch (UnknownHostException ex) {

    //FPF}
View Full Code Here

Examples of org.apache.avalon.excalibur.thread.ThreadPool

     *            invalid or named pool does not exist
     */
    public ThreadPool getThreadPool( final String name )
        throws IllegalArgumentException
    {
        final ThreadPool threadPool = (ThreadPool)m_threadPools.get( name );

        if( null == threadPool )
        {
            final String message = "Unable to locate ThreadPool named " + name;
            throw new IllegalArgumentException( message );
View Full Code Here

Examples of org.apache.axis.components.threadpool.ThreadPool

     * Create a server with the specified docRoot, max threads, and max sessions.
     */
    public NotSoSimpleAxisServer( File docRootDir, int maxPoolSize, int maxSessions )
    {
        m_docRootDir = docRootDir;
        m_pool = new ThreadPool( maxPoolSize );
        m_sessions = new LRUMap( maxSessions );
    }
View Full Code Here

Examples of org.apache.axis2.util.threadpool.ThreadPool

                connectionManagerParams.setTcpNoDelay(true);
                connectionManagerParams.setStaleCheckingEnabled(true);
                connectionManagerParams.setLinger(0);
                connectionManager.setParams(connectionManagerParams);
                httpClient = new HttpClient(connectionManager);
                configContext.setThreadPool(new ThreadPool(1, 5));
                configContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
                configContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient);
            }

            return new ServiceClient(configContext, axisService);
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.