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()); }
public IndexingActivityStatus GetCurrentIndexingActivityStatus() { return(DistributedIndexingActivityQueue.GetCurrentCompletionState()); }
/// <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()); }