// Token: 0x06001501 RID: 5377 RVA: 0x00052ED0 File Offset: 0x000510D0 public static MonitoringADConfig GetConfig(AmServerName serverName, IReplayAdObjectLookup adLookup, IReplayAdObjectLookup adLookupPartiallyConsistent, IADToplogyConfigurationSession adSession, IADToplogyConfigurationSession adSessionPartiallyConsistent, Func <bool> isServiceShuttingDownFunc) { ReplayServerPerfmon.ADConfigRefreshCalls.Increment(); ReplayServerPerfmon.ADConfigRefreshCallsPerSec.Increment(); Stopwatch stopwatch = Stopwatch.StartNew(); MonitoringADConfig config = new MonitoringADConfig(serverName, adLookup, adLookupPartiallyConsistent, adSession, adSessionPartiallyConsistent, isServiceShuttingDownFunc); Exception ex = ADUtils.RunADOperation(delegate() { config.Refresh(); }, 2); ReplayServerPerfmon.ADConfigRefreshLatency.IncrementBy(stopwatch.ElapsedTicks); ReplayServerPerfmon.ADConfigRefreshLatencyBase.Increment(); ExTraceGlobals.ADCacheTracer.TraceDebug <TimeSpan>((long)config.GetHashCode(), "MonitoringADConfig.GetConfig took {0}", stopwatch.Elapsed); if (stopwatch.Elapsed > MonitoringADConfig.MaxHealthyADRefreshDuration) { ReplayCrimsonEvents.ADConfigRefreshWasSlow.LogPeriodic <TimeSpan>(Environment.MachineName, DiagCore.DefaultEventSuppressionInterval, stopwatch.Elapsed); } if (ex != null) { MonitoringADConfig.Tracer.TraceError <string, string>((long)config.GetHashCode(), "MonitoringADConfig.GetConfig( {0} ): Got exception: {1}", serverName.NetbiosName, AmExceptionHelper.GetExceptionToStringOrNoneString(ex)); ReplayCrimsonEvents.ADConfigRefreshFailed.LogPeriodic <string, string>(Environment.MachineName, DiagCore.DefaultEventSuppressionInterval, ex.ToString(), Environment.StackTrace); throw new MonitoringADConfigException(ex.Message, ex); } return(config); }
public MonitoringADConfigManager(IReplayAdObjectLookup adObjectLookup, IReplayAdObjectLookup adObjectLookupPartiallyConsistent, IADToplogyConfigurationSession adSession, IADToplogyConfigurationSession adSessionPartiallyConsistent) : base(TimeSpan.Zero, TimeSpan.FromMilliseconds((double)RegistryParameters.MonitoringADConfigManagerIntervalInMsec), "MonitoringADConfigManager") { this.m_adObjectLookup = adObjectLookup; this.m_adObjectLookupPartiallyConsistent = adObjectLookupPartiallyConsistent; this.m_adSession = adSession; this.m_adSessionPartiallyConsistent = adSessionPartiallyConsistent; }
// Token: 0x06000190 RID: 400 RVA: 0x00009C59 File Offset: 0x00007E59 internal ActiveManagerCore(IReplicaInstanceManager replicaInstanceManager, IReplayAdObjectLookup adLookup, IADConfig adConfig) { this.m_replicaInstanceManager = replicaInstanceManager; this.AdLookup = adLookup; this.m_registryMonitor = new RegistryMonitor(adConfig); ActiveManagerServerPerfmon.GetServerForDatabaseServerCalls.RawValue = 0L; ActiveManagerServerPerfmon.GetServerForDatabaseServerCallsPerSec.RawValue = 0L; }
// Token: 0x060014FF RID: 5375 RVA: 0x00052E79 File Offset: 0x00051079 protected MonitoringADConfig(AmServerName serverName, IReplayAdObjectLookup adLookup, IReplayAdObjectLookup adLookupPartiallyConsistent, IADToplogyConfigurationSession adSession, IADToplogyConfigurationSession adSessionPartiallyConsistent, Func <bool> isServiceShuttingDownFunc) { this.m_targetServerName = serverName; this.AdLookup = adLookup; this.AdLookupPartiallyConsistent = adLookupPartiallyConsistent; this.AdSessionIgnoreInvalid = adSession; this.AdSessionPartiallyConsistent = adSessionPartiallyConsistent; this.m_isServiceShuttingDownFunc = isServiceShuttingDownFunc; }
internal ADConfigLookupComponent() { IReplayAdObjectLookup replayAdObjectLookup = Dependencies.ReplayAdObjectLookup; IReplayAdObjectLookup replayAdObjectLookupPartiallyConsistent = Dependencies.ReplayAdObjectLookupPartiallyConsistent; this.AdSession = ADSessionFactory.CreateIgnoreInvalidRootOrgSession(true); this.AdSessionPartiallyConsistent = ADSessionFactory.CreatePartiallyConsistentRootOrgSession(true); this.ADConfigManager = new MonitoringADConfigManager(replayAdObjectLookup, replayAdObjectLookupPartiallyConsistent, this.AdSession, this.AdSessionPartiallyConsistent); Dependencies.Container.RegisterInstance <IMonitoringADConfigProvider>(this.ADConfigManager); }
// Token: 0x06000853 RID: 2131 RVA: 0x000283E4 File Offset: 0x000265E4 private IADServer HandleMissingServer(AmServerName serverName) { ADConfig.Tracer.TraceError <string>((long)this.GetHashCode(), "Server {0} not found", serverName.Fqdn); IReplayAdObjectLookup replayAdObjectLookup = Dependencies.ReplayAdObjectLookup; IADServer iadserver = replayAdObjectLookup.ServerLookup.FindServerByFqdn(serverName.Fqdn); if (iadserver != null) { this.Refresh("HandleMissingServer"); } return(iadserver); }
// Token: 0x06000855 RID: 2133 RVA: 0x00028468 File Offset: 0x00026668 private IADDatabase HandleMissingDatabase(Guid dbGuid) { ADConfig.Tracer.TraceError <Guid>((long)this.GetHashCode(), "Database {0} not found", dbGuid); IReplayAdObjectLookup replayAdObjectLookup = Dependencies.ReplayAdObjectLookup; IADDatabase iaddatabase = replayAdObjectLookup.DatabaseLookup.FindAdObjectByGuid(dbGuid); if (iaddatabase != null) { this.Refresh("HandleMissingDatabase"); } return(iaddatabase); }
// Token: 0x0600135F RID: 4959 RVA: 0x0004EB5C File Offset: 0x0004CD5C internal CopyStatusLookupComponent() { CopyStatusClientLookupTable statusTable = null; IReplayAdObjectLookup replayAdObjectLookup = Dependencies.ReplayAdObjectLookup; this.ActiveManagerInstance = ActiveManager.CreateCustomActiveManager(true, replayAdObjectLookup.DagLookup, replayAdObjectLookup.ServerLookup, replayAdObjectLookup.MiniServerLookup, null, null, replayAdObjectLookup.DatabaseLookup, replayAdObjectLookup.AdSession, true); if (CopyStatusLookupComponent.CopyStatusClientCachingEnabled) { statusTable = new CopyStatusClientLookupTable(); this.CopyStatusPoller = new CopyStatusPoller(Dependencies.MonitoringADConfigProvider, statusTable, this.ActiveManagerInstance); } this.CopyStatusLookup = new CopyStatusClientLookup(statusTable, this.CopyStatusPoller, this.ActiveManagerInstance); Dependencies.Container.RegisterInstance <ICopyStatusClientLookup>(this.CopyStatusLookup); }
// Token: 0x06000857 RID: 2135 RVA: 0x000284E4 File Offset: 0x000266E4 public IEnumerable <IADDatabase> HandleMissingServerDatabases(AmServerName serverName) { ADConfig.Tracer.TraceError <AmServerName>((long)this.GetHashCode(), "Databases for server {0} not found", serverName); IReplayAdObjectLookup replayAdObjectLookup = Dependencies.ReplayAdObjectLookup; IADServer iadserver = replayAdObjectLookup.ServerLookup.FindServerByFqdn(serverName.Fqdn); if (iadserver != null) { this.Refresh("HandleMissingServerDatabases"); IMonitoringADConfig currentConfig = this.GetCurrentConfig(); if (currentConfig == null) { return(null); } IEnumerable <IADDatabase> result = null; if (currentConfig.DatabaseMap.TryGetValue(serverName, out result)) { return(result); } } return(null); }