ExecuteActivity() 공개 정적인 메소드

public static ExecuteActivity ( IndexingActivity activity, bool waitForComplete, bool distribute ) : void
activity IndexingActivity
waitForComplete bool
distribute bool
리턴 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);
 }