private void RefreshInternal()
        {
            MonitoringADConfig config = null;
            Exception          ex     = null;

            try
            {
                Dependencies.ReplayAdObjectLookup.Clear();
                config = MonitoringADConfig.GetConfig(new AmServerName(Dependencies.ManagementClassHelper.LocalComputerFqdn), this.m_adObjectLookup, this.m_adObjectLookupPartiallyConsistent, this.m_adSession, this.m_adSessionPartiallyConsistent, () => base.PrepareToStopCalled);
                this.healthReporter.RaiseGreenEvent();
            }
            catch (MonitoringADConfigException ex2)
            {
                ex = ex2;
                ReplayCrimsonEvents.MonitoringADLookupError.LogPeriodic <string, MonitoringADConfigException>(this.GetHashCode(), DiagCore.DefaultEventSuppressionInterval, ex2.ErrorMsg, ex2);
                this.healthReporter.RaiseRedEvent(ex2.ErrorMsg);
            }
            finally
            {
                lock (this.m_locker)
                {
                    if (ex == null)
                    {
                        this.m_config = config;
                    }
                    this.LastException = ex;
                }
                this.m_firstLookupCompleted.Set();
            }
        }
Exemplo n.º 2
0
        // Token: 0x060013B9 RID: 5049 RVA: 0x000502BC File Offset: 0x0004E4BC
        public void Initialize()
        {
            if (Interlocked.CompareExchange(ref this.m_fInitialized, 1, 0) == 1)
            {
                return;
            }
            this.ADConfig = MonitoringADConfig.GetConfig(new AmServerName(this.m_serverName, true), Dependencies.ReplayAdObjectLookup, Dependencies.ReplayAdObjectLookupPartiallyConsistent, ADSessionFactory.CreateIgnoreInvalidRootOrgSession(true), ADSessionFactory.CreatePartiallyConsistentRootOrgSession(true), null);
            ActiveManager noncachingActiveManagerInstance             = ActiveManager.GetNoncachingActiveManagerInstance();
            AmMultiNodeCopyStatusFetcher amMultiNodeCopyStatusFetcher = new AmMultiNodeCopyStatusFetcher(this.ADConfig.AmServerNames, this.ADConfig.DatabaseMap, RpcGetDatabaseCopyStatusFlags2.None, noncachingActiveManagerInstance, false);
            Dictionary <Guid, Dictionary <AmServerName, CopyStatusClientCachedEntry> > status = amMultiNodeCopyStatusFetcher.GetStatus();
            CopyStatusClientLookupTable copyStatusClientLookupTable = new CopyStatusClientLookupTable();

            copyStatusClientLookupTable.UpdateCopyStatusCachedEntries(status);
            this.CopyStatusLookup = new CopyStatusClientLookup(copyStatusClientLookupTable, null, noncachingActiveManagerInstance);
        }