ExecuteActivity() public static method

public static ExecuteActivity ( IndexingActivity activity, bool waitForComplete, bool distribute ) : void
activity IndexingActivity
waitForComplete bool
distribute bool
return void
示例#1
0
        private void RefreshIndexOneNode(Node node)
        {
            // node index is refreshed only on this node and should not be distributed.
            var versionId = node.VersionId;

            if (RepositoryInstance.ContentQueryIsAllowed)
            {
                var activity = CreateActivity(IndexingActivityType.UpdateDocument, node.Id, node.VersionId, node.VersionTimestamp, null, null);
                IndexingActivityManager.ExecuteActivity(activity, true, false);
            }
        }
示例#2
0
        private static void ProcessTasks(IndexingActivity[] activities, System.IO.TextWriter consoleOut)
        {
            if (consoleOut != null && activities.Length != 0)
            {
                consoleOut.Write("    Executing {0} unprocessed tasks ...", activities.Length);
            }

            foreach (var activity in activities)
            {
                activity.FromHealthMonitor = true;  // make sure adddocument will delete first
                IndexingActivityManager.ExecuteActivity(activity, false, false);
            }
        }
示例#3
0
        internal static void ExecuteLostIndexingActivities()
        {
            lock (_executingUnprocessedIndexingActivitiesLock)
            {
                var gap = MissingActivityHandler.GetOldestGapAndMoveToNext();

                var i = 0;
                while (i * ACTIVITIESFRAGMENTSIZE < gap.Length)
                {
                    var gapSegment = gap.Skip(i * ACTIVITIESFRAGMENTSIZE).Take(ACTIVITIESFRAGMENTSIZE).ToArray();

                    var activities = IndexingActivityManager.GetUnprocessedActivities(gapSegment);
                    if (activities.Length > 0)
                    {
                        foreach (var act in activities)
                        {
                            act.FromHealthMonitor = true;
                            IndexingActivityManager.ExecuteActivity(act, false, false);
                        }
                    }
                    i++;
                }
            }
        }
示例#4
0
 private static void ExecuteActivity(IndexingActivity activity)
 {
     IndexingActivityManager.RegisterActivity(activity);
     IndexingActivityManager.ExecuteActivity(activity, true, true);
 }