Package com.flaptor.hounder.searcher

Examples of com.flaptor.hounder.searcher.ISearcher


    @TestInfo(testType = TestInfo.TestType.UNIT)
    public void testMultithreaded() throws InterruptedException{
   
        int NUM_THREADS = 100;
        WaitingSearcher baseSearcher = new WaitingSearcher();
        final ISearcher searcher = new QueriesInProgressSearcher(baseSearcher);
       
        final Object lock = new Object();
        for (int i =0; i < NUM_THREADS; ++i) {
            new Thread() {
                public void run() {
                    synchronized (lock) {queriesInProgress++;}
                    try {
            searcher.search(null, 0, 1, null, 1, null, null);
          } catch (SearcherException e) {
            e.printStackTrace();
            fail();
          }
                    synchronized (lock) {queriesInProgress--;}
View Full Code Here

TOP

Related Classes of com.flaptor.hounder.searcher.ISearcher

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.