src/main/java/ch/uzh/ifi/seal/ase/cscc/index/ParallelizedInvertedIndex.java
@Override
    public void finishIndexing() {

        // if we do shutdown then no new tasks can be added to queue. this is a problem because the remaining docs
        // (tasks) in the queue might still encounter a locked index and need to be re-added to queue several more times
//        executorService.shutdown();

        while (executorService.getQueue().size() > 0) {
            System.out.println("Queue size: " + executorService.getQueue().size());
            try {
                sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

    }
/**
     * Call this method when this instance is not used anymore. It closes the ExecuterService.
     */
Call this method when this instance is not used anymore. It closes the ExecuterService.
Call this method when this instance is not used anymore . It closes the ExecuterService .
@Override
    public void finishIndexing() {
        while (executorService.getQueue().size() > 0) {
            System.out.println("Queue size: " + executorService.getQueue().size());
            try {
                sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
@ Override public void finishIndexing ( ) { while ( executorService . getQueue ( ) . size ( ) > 0 ) { System . out . println ( "Queue size: " + executorService . getQueue ( ) . size ( ) ) ; try { sleep ( 1000 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } }
Call this method when this instance is not used anymore.
Call this method when this instance is not used anymore .
// if we do shutdown then no new tasks can be added to queue. this is a problem because the remaining docs // (tasks) in the queue might still encounter a locked index and need to be re-added to queue several more times //        executorService.shutdown();