Examples of prestartAllCoreThreads()


Examples of java.util.concurrent.ThreadPoolExecutor.prestartAllCoreThreads()

        executor.setCorePoolSize(NUM_THREADS);

        log.log(Level.INFO,
            "Prestarting {0,number,integer} threads", NUM_THREADS);

        executor.prestartAllCoreThreads();

        AsynchronousChannelProvider provider =
            AsynchronousChannelProvider.provider();

        AsynchronousChannelGroup group =
View Full Code Here

Examples of java.util.concurrent.ThreadPoolExecutor.prestartAllCoreThreads()

        int mebiByte = 1048510;
        int clients = 1;
        int iterations = 2;
        ThreadPoolExecutor threadPool = new ThreadPoolExecutor(clients, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>());
        threadPool.prestartAllCoreThreads();
        Worker[] workers = new Worker[clients];
        Future[] tasks = new Future[clients];
        for (int i = 0; i < clients; ++i)
        {
            workers[i] = new Worker(sslContext, iterations, false, mebiByte, 64 * mebiByte);
 
View Full Code Here

Examples of java.util.concurrent.ThreadPoolExecutor.prestartAllCoreThreads()

        int mebiByte = 1048510;
        int clients = 1;
        int iterations = 2;
        ThreadPoolExecutor threadPool = new ThreadPoolExecutor(clients, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>());
        threadPool.prestartAllCoreThreads();
        Worker[] workers = new Worker[clients];
        Future[] tasks = new Future[clients];
        for (int i = 0; i < clients; ++i)
        {
            workers[i] = new Worker(sslContext, iterations, true, mebiByte, 64 * mebiByte);
 
View Full Code Here

Examples of java.util.concurrent.ThreadPoolExecutor.prestartAllCoreThreads()

        executor.setCorePoolSize(NUM_THREADS);

        log.log(Level.INFO,
            "Prestarting {0,number,integer} threads", NUM_THREADS);

        executor.prestartAllCoreThreads();

        AsynchronousChannelProvider provider =
            AsynchronousChannelProvider.provider();

        AsynchronousChannelGroup group =
View Full Code Here

Examples of java.util.concurrent.ThreadPoolExecutor.prestartAllCoreThreads()

        log.info("Start testing");



        ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(TEST_THREADS);
        executor.prestartAllCoreThreads();
        for (int i = 0; i < TEST_LOOPS; i++) {
            executor.submit(new SimulateTask());
        }

View Full Code Here

Examples of java.util.concurrent.ThreadPoolExecutor.prestartAllCoreThreads()

                public Thread newThread(Runnable r) {
                    return new Thread(r, "ClientPool");
                }

            });
        workerPool.prestartAllCoreThreads();

        SocketFactory socketFactory = null;
        if ("https".equals(host.getSchemeName())) {
            TrustManager[] trustManagers = null;
            if (config.isDisableSSLVerification()) {
View Full Code Here

Examples of java.util.concurrent.ThreadPoolExecutor.prestartAllCoreThreads()

    System.out.println( "Totaltime Search = " + measureSearch );
  }

  public long measure(boolean plainLucene) throws Exception {
    ThreadPoolExecutor threadPool = (ThreadPoolExecutor) Executors.newFixedThreadPool( SEARCH_THREADS );
    threadPool.prestartAllCoreThreads();
    CountDownLatch startSignal = new CountDownLatch(1);
    List<SearcherThread> threadsList = new ArrayList<SearcherThread>( TOTAL_SEARCHES );
    IndexSearcher indexSearcher = getNewSearcher();
    for (int i = 0; i < TOTAL_SEARCHES; i++) {
      // Create a thread and invoke it
View Full Code Here

Examples of java.util.concurrent.ThreadPoolExecutor.prestartAllCoreThreads()

      final int nbrOfClassesPerThread = 10;
      for ( int i = 0; i < nbrOfThread; i++ ) {
        runnables.add( new DoAddClasses( sf, i, nbrOfClassesPerThread ) );
      }
      final ThreadPoolExecutor poolExecutor = Executors.newFixedThreadPool( nbrOfThread, "SFI classes addition" );
      poolExecutor.prestartAllCoreThreads();
      for ( Runnable runnable : runnables ) {
        poolExecutor.execute( runnable );
      }
      poolExecutor.shutdown();
View Full Code Here

Examples of java.util.concurrent.ThreadPoolExecutor.prestartAllCoreThreads()

                public Thread newThread(Runnable r) {
                    return new Thread(r, "ClientPool");
                }

            });
        workerPool.prestartAllCoreThreads();

        BenchmarkWorker[] workers = new BenchmarkWorker[config.getThreads()];
        for (int i = 0; i < workers.length; i++) {
            workers[i] = new BenchmarkWorker(
                    params,
View Full Code Here

Examples of java.util.concurrent.ThreadPoolExecutor.prestartAllCoreThreads()

                public Thread newThread(Runnable r) {
                    return new Thread(r, "ClientPool");
                }

            });
        workerPool.prestartAllCoreThreads();

        SocketFactory socketFactory = null;
        if ("https".equals(host.getSchemeName())) {
            TrustManager[] trustManagers = null;
            if (config.isDisableSSLVerification()) {
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.