Exemplo n.º 1
0
        public static void StopScheduling()
        {
            List <JobScheduler> list = new List <JobScheduler>(MailboxSyncerJobs.schedulers.Count);

            lock (MailboxSyncerJobs.syncRoot)
            {
                foreach (JobScheduler item in MailboxSyncerJobs.schedulers.Values)
                {
                    list.Add(item);
                }
                MailboxSyncerJobs.schedulers.Clear();
            }
            if (list.Count > 0)
            {
                foreach (JobScheduler jobScheduler in list)
                {
                    jobScheduler.Stop();
                }
            }
            if (SystemWorkloadManager.Status != WorkloadExecutionStatus.NotInitialized)
            {
                SystemWorkloadManager.Shutdown();
                MrsAndProxyActivityLogger.Stop();
            }
        }
Exemplo n.º 2
0
 public static void StartScheduling()
 {
     SystemWorkloadManager.Initialize(MrsAndProxyActivityLogger.Start());
     MailboxSyncerJobs.GetScheduler(WorkloadType.MailboxReplicationServiceHighPriority);
     MailboxSyncerJobs.GetScheduler(WorkloadType.MailboxReplicationServiceInteractive);
     MailboxSyncerJobs.GetScheduler(WorkloadType.MailboxReplicationServiceInternalMaintenance);
     MailboxSyncerJobs.GetScheduler(WorkloadType.MailboxReplicationService);
 }
 public static void Stop()
 {
     if (MrsAndProxyActivityLogger.instance != null)
     {
         MrsAndProxyActivityLogger.InternalLogRow(MrsAndProxyActivityLogger.instance.id, "ServiceStop", null, null, null, null);
         MrsAndProxyActivityLogger.instance.Dispose();
         MrsAndProxyActivityLogger.instance = null;
     }
 }
        protected override void InternalLogActivityEvent(IActivityScope scope, ActivityEventType eventType)
        {
            List <KeyValuePair <string, object> > customData = null;

            switch (eventType)
            {
            case ActivityEventType.StartActivity:
            case ActivityEventType.ResumeActivity:
                break;

            case ActivityEventType.SuspendActivity:
            case ActivityEventType.EndActivity:
                customData = WorkloadManagementLogger.FormatWlmActivity(scope, true);
                break;

            default:
                MrsAndProxyActivityLogger.instance.SafeTraceDebug(0L, "Skip logging ActivityEvent '{0}'.", new object[]
                {
                    eventType
                });
                return;
            }
            MrsAndProxyActivityLogger.InternalLogRow(scope.ActivityId, ActivityContextLogger.ActivityEventTypeDictionary[eventType], scope.Action, scope.UserId, scope.ClientInfo, customData);
        }
 public static MrsAndProxyActivityLogger Start()
 {
     MrsAndProxyActivityLogger.instance = new MrsAndProxyActivityLogger();
     MrsAndProxyActivityLogger.InternalLogRow(MrsAndProxyActivityLogger.instance.id, "ServiceStart", null, null, null, null);
     return(MrsAndProxyActivityLogger.instance);
 }