Raven.Database.Prefetching.PrefetchingBehavior.AfterStorageCommitBeforeWorkNotifications C# (CSharp) Method

AfterStorageCommitBeforeWorkNotifications() public method

public AfterStorageCommitBeforeWorkNotifications ( JsonDocument docs ) : void
docs Raven.Abstractions.Data.JsonDocument
return void
		public void AfterStorageCommitBeforeWorkNotifications(JsonDocument[] docs)
		{
			if (context.Configuration.DisableDocumentPreFetchingForIndexing || docs.Length == 0)
				return;

			if (prefetchingQueue.Count >= // don't use too much, this is an optimization and we need to be careful about using too much mem
				context.Configuration.MaxNumberOfItemsToPreFetchForIndexing)
				return;

			foreach (var jsonDocument in docs)
			{
				DocumentRetriever.EnsureIdInMetadata(jsonDocument);
				prefetchingQueue.Add(jsonDocument);
			}
		}