@ Nonnull @ ReturnsMutableCopy public ICommonsList < IIndexerWorkItem > stop ( ) { // don't take any more actions m_aImmediateCollector . stopQueuingNewObjects ( ) ; // Get all remaining objects and save them for late reuse final ICommonsList < IIndexerWorkItem > aRemainingItems = m_aImmediateCollector . drainQueue ( ) ; // Shutdown the thread pool afterwards ExecutorServiceHelper . shutdownAndWaitUntilAllTasksAreFinished ( m_aSenderThreadPool ) ; return aRemainingItems ; }
Stop the indexer work queue immediately .