示例#1
0
        public void ShutDown()
        {
            CommitManager?.ShutDown();

            if (IndexingEngine == null)
            {
                return;
            }

            //TODO: [async] rewrite this using async APIs.
            if (IndexingEngine.IndexIsCentralized)
            {
                CentralizedIndexingActivityQueue.ShutDown();
            }
            else
            {
                DistributedIndexingActivityQueue.ShutDown();
            }

            //TODO: [async] rewrite this using async APIs.
            IndexingEngine.ShutDownAsync(CancellationToken.None).GetAwaiter().GetResult();
            SnLog.WriteInformation("Indexing engine has stopped. Max task id and exceptions: " + DistributedIndexingActivityQueue.GetCurrentCompletionState());
        }
示例#2
0
 public IndexingActivityStatus GetCurrentIndexingActivityStatus()
 {
     return(DistributedIndexingActivityQueue.GetCurrentCompletionState());
 }
示例#3
0
        /// <summary>
        /// Shuts down the indexing feature: stops CommitManager, indexing activity organizator and IndexingEngine.
        /// </summary>
        public static void ShutDown()
        {
            CommitManager?.ShutDown();

            if (IndexingEngine == null)
            {
                return;
            }

            if (IndexingEngine.IndexIsCentralized)
            {
                CentralizedIndexingActivityQueue.ShutDown();
            }
            else
            {
                DistributedIndexingActivityQueue.ShutDown();
            }

            IndexingEngine.ShutDown();
            SnLog.WriteInformation("Indexing engine has stopped. Max task id and exceptions: " + DistributedIndexingActivityQueue.GetCurrentCompletionState());
        }