Package training.java.multithreading.examples.executorservice.fileindexationexamplewithlucene.files

Examples of training.java.multithreading.examples.executorservice.fileindexationexamplewithlucene.files.ConcurrentFileCrawler


    ExecutorService newFixedThreadPool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() + 1);
    CountDownLatch firstIndexerStartingCountdownLatch = new CountDownLatch(1);
    crawlersStartedCount = new AtomicInteger(independantPathsToScan.length);
    for (String string : independantPathsToScan) {
      newFixedThreadPool.submit(new ConcurrentFileCrawler(queue, IndexationConstants.FILTER, new File(string), crawlersStartedCount));
    }

    for (int i = 0; i < concurrentIndexerCount; i++) {
      newFixedThreadPool.submit(new ConcurrentIndexer(queue, documentsIndexed, crawlersStartedCount,firstIndexerStartingCountdownLatch));
    }
View Full Code Here

TOP

Related Classes of training.java.multithreading.examples.executorservice.fileindexationexamplewithlucene.files.ConcurrentFileCrawler

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.