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();
            }
        }
Example #2
0
 // Token: 0x0600017F RID: 383 RVA: 0x00007464 File Offset: 0x00005664
 public DatabaseManager(string serviceName, int maxThreads, IEventBasedAssistantType[] eventBasedAssistantTypeArray, ITimeBasedAssistantType[] timeBasedAssistantTypeArray, bool provideRpc)
 {
     SingletonEventLogger.GetSingleton(serviceName);
     if (eventBasedAssistantTypeArray == null && timeBasedAssistantTypeArray == null)
     {
         throw new ArgumentNullException("eventBasedAssistantTypeArray and timeBasedAssistantTypeArray cannot be both null");
     }
     this.serviceName = serviceName;
     Configuration.Initialize(serviceName);
     if (eventBasedAssistantTypeArray != null)
     {
         PerformanceCountersPerAssistantInstance performanceCountersPerAssistantsTotal = new PerformanceCountersPerAssistantInstance(this.serviceName + "-Total", null);
         this.assistantTypes = AssistantType.CreateArray(eventBasedAssistantTypeArray, performanceCountersPerAssistantsTotal);
     }
     this.poisonControlMaster = new PoisonControlMaster(Configuration.ServiceRegistryKeyPath);
     this.throttle            = Throttle.CreateParentThrottle("DatabaseManager", maxThreads);
     if (timeBasedAssistantTypeArray != null)
     {
         SystemWorkloadManager.Initialize(AssistantsLog.Instance);
         this.timeBasedDriverManager = new TimeBasedDriverManager(this.throttle, timeBasedAssistantTypeArray, provideRpc);
     }
     this.eventGovernor = new ServerGovernor("DatabaseManagerEvent", new Throttle("DatabaseManagerEvent", maxThreads, this.throttle));
     this.starter       = new Starter(new Init(this.Init));
     OnlineDiagnostics.Instance.RegisterDatabaseManager(this);
     base.TracePfd("PFD AIS {0} Database manager: Inialized for Service {1}", new object[]
     {
         30103,
         this.serviceName
     });
 }
 public static void StartScheduling()
 {
     SystemWorkloadManager.Initialize(MrsAndProxyActivityLogger.Start());
     MailboxSyncerJobs.GetScheduler(WorkloadType.MailboxReplicationServiceHighPriority);
     MailboxSyncerJobs.GetScheduler(WorkloadType.MailboxReplicationServiceInteractive);
     MailboxSyncerJobs.GetScheduler(WorkloadType.MailboxReplicationServiceInternalMaintenance);
     MailboxSyncerJobs.GetScheduler(WorkloadType.MailboxReplicationService);
 }
Example #4
0
        private IRequestQueueManager CreateRubsQueue()
        {
            LoadBalanceWorkload loadBalanceWorkload = new LoadBalanceWorkload(this.Settings);

            SystemWorkloadManager.Initialize(new LoadBalanceActivityLogger());
            SystemWorkloadManager.RegisterWorkload(loadBalanceWorkload);
            return(loadBalanceWorkload);
        }
Example #5
0
 public void RequestStop(HangDetector hangDetector)
 {
     ExTraceGlobals.TimeBasedDriverManagerTracer.TraceDebug <TimeBasedDriverManager>((long)this.GetHashCode(), "{0}: Stopping", this);
     if (this.rpcServerStarted)
     {
         AssistantsRpcServerBase.StopServer();
         this.rpcServerStarted = false;
     }
     foreach (TimeBasedAssistantControllerWrapper timeBasedAssistantControllerWrapper in this.TimeBasedAssistantControllerArray)
     {
         AIBreadcrumbs.ShutdownTrail.Drop("Stopping controller: " + timeBasedAssistantControllerWrapper.Controller.TimeBasedAssistantType);
         timeBasedAssistantControllerWrapper.Controller.RequestStop(hangDetector);
         SystemWorkloadManager.UnregisterWorkload(timeBasedAssistantControllerWrapper);
         AIBreadcrumbs.ShutdownTrail.Drop("Finished stopping " + timeBasedAssistantControllerWrapper.Controller.TimeBasedAssistantType);
     }
 }
Example #6
0
 public void Start(SecurityIdentifier exchangeServersSid)
 {
     ExTraceGlobals.TimeBasedDriverManagerTracer.TraceDebug <TimeBasedDriverManager>((long)this.GetHashCode(), "{0}: Starting", this);
     foreach (TimeBasedAssistantControllerWrapper timeBasedAssistantControllerWrapper in this.TimeBasedAssistantControllerArray)
     {
         timeBasedAssistantControllerWrapper.Controller.Start();
         SystemWorkloadManager.RegisterWorkload(timeBasedAssistantControllerWrapper);
     }
     if (this.provideAssistantsRpc)
     {
         AssistantsRpcServer.StartServer(exchangeServersSid);
         this.rpcServerStarted = true;
     }
     base.TracePfd("PFD AIS {0} {1}: Started", new object[]
     {
         25175,
         this
     });
 }
Example #7
0
 // Token: 0x06000187 RID: 391 RVA: 0x000075C4 File Offset: 0x000057C4
 public void Dispose()
 {
     if (SystemWorkloadManager.Status != WorkloadExecutionStatus.NotInitialized)
     {
         SystemWorkloadManager.Shutdown();
     }
     if (this.exRpcAdmin != null)
     {
         this.exRpcAdmin.Dispose();
         this.exRpcAdmin = null;
     }
     if (this.databaseStatusTimer != null)
     {
         this.databaseStatusTimer.Dispose();
         this.databaseStatusTimer = null;
     }
     if (this.storeService != null)
     {
         this.storeService.Dispose();
         this.storeService = null;
     }
     this.eventGovernor.Dispose();
 }
Example #8
0
 public void Start()
 {
     SystemWorkloadManager.RegisterWorkload(this);
 }