// Token: 0x060011BD RID: 4541 RVA: 0x00049828 File Offset: 0x00047A28 public HealthInfoPersisted ConvertToHealthInfoPersisted() { DbCopyHealthInfoInternalTable dbCopyHealthInfoInternalTable = null; lock (this.m_locker) { dbCopyHealthInfoInternalTable = this.m_healthTable; } return(dbCopyHealthInfoInternalTable.ConvertToHealthInfoPersisted()); }
// Token: 0x060011BE RID: 4542 RVA: 0x00049874 File Offset: 0x00047A74 public Exception PersistHealthInfoToXml() { DbCopyHealthInfoInternalTable dbCopyHealthInfoInternalTable = null; lock (this.m_locker) { dbCopyHealthInfoInternalTable = this.m_healthTable; } return(dbCopyHealthInfoInternalTable.PersistHealthInfoToXml()); }
// Token: 0x060011BB RID: 4539 RVA: 0x00049790 File Offset: 0x00047990 public void PossiblyReportObjectsNotFoundInAD(IMonitoringADConfig adConfig) { DbCopyHealthInfoInternalTable dbCopyHealthInfoInternalTable = null; lock (this.m_locker) { dbCopyHealthInfoInternalTable = this.m_healthTable; } dbCopyHealthInfoInternalTable.PossiblyReportObjectsNotFoundInAD(adConfig); }
// Token: 0x060011BC RID: 4540 RVA: 0x000497DC File Offset: 0x000479DC public void UpdateAvailabilityRedundancyStates(IMonitoringADConfig adConfig) { DbCopyHealthInfoInternalTable dbCopyHealthInfoInternalTable = null; lock (this.m_locker) { dbCopyHealthInfoInternalTable = this.m_healthTable; } dbCopyHealthInfoInternalTable.UpdateAvailabilityRedundancyStates(adConfig); }
// Token: 0x060011B8 RID: 4536 RVA: 0x000495C0 File Offset: 0x000477C0 public void ReportServerFoundInAD(AmServerName serverName) { DbCopyHealthInfoInternalTable dbCopyHealthInfoInternalTable = null; lock (this.m_locker) { dbCopyHealthInfoInternalTable = this.m_healthTable; } dbCopyHealthInfoInternalTable.ReportServerFoundInAD(serverName); }
// Token: 0x060011B9 RID: 4537 RVA: 0x0004960C File Offset: 0x0004780C public void ReportDbCopiesFoundInAD(IEnumerable <IADDatabase> databases, AmServerName serverName) { DbCopyHealthInfoInternalTable dbCopyHealthInfoInternalTable = null; lock (this.m_locker) { dbCopyHealthInfoInternalTable = this.m_healthTable; } foreach (IADDatabase iaddatabase in databases) { DbCopyHealthInfoTable.Tracer.TraceDebug <string, string>((long)this.GetHashCode(), "Reporting that database copy '{0}\\{1}' was found in the AD.", iaddatabase.Name, serverName.NetbiosName); dbCopyHealthInfoInternalTable.ReportDbCopyFoundInAD(iaddatabase, serverName); } }
// Token: 0x060011B3 RID: 4531 RVA: 0x00049228 File Offset: 0x00047428 public bool UpdateHealthInfo(HealthInfoPersisted healthInfo, bool isPrimary) { DbCopyHealthInfoTable.Tracer.TraceDebug <bool>((long)this.GetHashCode(), "UpdateHealthInfo() called with isPrimary = '{0}'", isPrimary); DateTime lastUpdateTimeUtc = healthInfo.GetLastUpdateTimeUtc(); DbCopyHealthInfoInternalTable dbCopyHealthInfoInternalTable = null; lock (this.m_locker) { if (this.m_fInitialized) { DateTimeHelper.SafeSubtract(lastUpdateTimeUtc, this.m_healthTable.LastUpdateTimeUtc); if (this.m_healthTable.LastUpdateTimeUtc > lastUpdateTimeUtc) { string text = DateTimeHelper.ToStringInvariantCulture(lastUpdateTimeUtc); string text2 = DateTimeHelper.ToStringInvariantCulture(this.m_healthTable.LastUpdateTimeUtc); if (isPrimary) { DbCopyHealthInfoTable.Tracer.TraceError <string, string>((long)this.GetHashCode(), "UpdateHealthInfo(): Primary node is ignoring older table with update time '{0}'. Local update time: {1}", text, text2); ReplayCrimsonEvents.DHTPrimaryStartupIgnoringOlderTable.LogPeriodic <string, string>(text, DateTimeHelper.OneHour, text, text2); return(false); } DbCopyHealthInfoTable.Tracer.TraceError <TimeSpan>((long)this.GetHashCode(), "UpdateHealthInfo(): The health table is being replaced with an older one. Age difference: {0}", this.m_healthTable.LastUpdateTimeUtc.Subtract(lastUpdateTimeUtc)); ReplayCrimsonEvents.DHTSecondaryOlderTable.LogPeriodic <string, string>(text, DateTimeHelper.OneHour, text, text2); } } DbCopyHealthInfoTable.Tracer.TraceDebug <DateTime>((long)this.GetHashCode(), "UpdateHealthInfo(): The health table is being updated/replaced with a table of update timestamp: {0}", lastUpdateTimeUtc); this.m_fInitialized = false; this.m_healthTable = new DbCopyHealthInfoInternalTable(this.m_fileFullPath); this.m_healthTable.InitializeFromHealthInfoPersisted(healthInfo); this.m_fInitialized = true; dbCopyHealthInfoInternalTable = this.m_healthTable; } Exception ex = dbCopyHealthInfoInternalTable.PersistHealthInfoToXml(); if (ex != null) { DbCopyHealthInfoTable.Tracer.TraceError <Exception>((long)this.GetHashCode(), "UpdateHealthInfo(): Failed to persist health table to XML file. Error: {0}", ex); if (isPrimary) { ReplayCrimsonEvents.DHTPrimaryPersistFailed.LogPeriodic <string, Exception>(Environment.MachineName, DateTimeHelper.OneHour, ex.Message, ex); } else { ReplayCrimsonEvents.DHTSecondaryPersistFailed.LogPeriodic <string, Exception>(Environment.MachineName, DateTimeHelper.OneHour, ex.Message, ex); } } return(true); }
// Token: 0x060011BA RID: 4538 RVA: 0x000496B0 File Offset: 0x000478B0 public void ReportDbCopyStatusesFound(IMonitoringADConfig adConfig, AmServerName serverName, IEnumerable <CopyStatusClientCachedEntry> statuses) { DbCopyHealthInfoInternalTable dbCopyHealthInfoInternalTable = null; lock (this.m_locker) { dbCopyHealthInfoInternalTable = this.m_healthTable; } foreach (CopyStatusClientCachedEntry copyStatusClientCachedEntry in statuses) { IADDatabase iaddatabase; string text = adConfig.DatabaseByGuidMap.TryGetValue(copyStatusClientCachedEntry.DbGuid, out iaddatabase) ? iaddatabase.Name : copyStatusClientCachedEntry.DbGuid.ToString(); DbCopyHealthInfoTable.Tracer.TraceDebug <string, string>((long)this.GetHashCode(), "Reporting that a copy status for database copy '{0}\\{1}' was possibly retrieved.", text, serverName.NetbiosName); dbCopyHealthInfoInternalTable.ReportDbCopyStatusFound(copyStatusClientCachedEntry.DbGuid, text, serverName, copyStatusClientCachedEntry); } }
// Token: 0x060011B5 RID: 4533 RVA: 0x0004947C File Offset: 0x0004767C public HealthInfoPersisted GetHealthInfo() { DbCopyHealthInfoInternalTable dbCopyHealthInfoInternalTable = null; HealthInfoPersisted result = null; lock (this.m_locker) { if (this.m_fInitialized) { dbCopyHealthInfoInternalTable = this.m_healthTable; } else { DbCopyHealthInfoTable.Tracer.TraceError((long)this.GetHashCode(), "GetHealthInfo(): The health table is not yet initialized. Returning <NULL>"); } } if (dbCopyHealthInfoInternalTable != null) { result = dbCopyHealthInfoInternalTable.ConvertToHealthInfoPersisted(); } return(result); }
// Token: 0x060011B4 RID: 4532 RVA: 0x00049404 File Offset: 0x00047604 public DateTime GetLastUpdateTime() { DbCopyHealthInfoInternalTable dbCopyHealthInfoInternalTable = null; DateTime dateTime = DateTime.MinValue; lock (this.m_locker) { if (this.m_fInitialized) { dbCopyHealthInfoInternalTable = this.m_healthTable; } else { DbCopyHealthInfoTable.Tracer.TraceError <DateTime>((long)this.GetHashCode(), "GetLastUpdateTime(): The health table is not yet initialized. Returning '{0}'", dateTime); } } if (dbCopyHealthInfoInternalTable != null) { dateTime = dbCopyHealthInfoInternalTable.LastUpdateTimeUtc; } return(dateTime); }