// Token: 0x06000629 RID: 1577 RVA: 0x0001E7E4 File Offset: 0x0001C9E4 internal void DeleteFromPersistentStore() { using (AmPersistentClusdbState amPersistentClusdbState = new AmPersistentClusdbState(AmSystemManager.Instance.Config.DagConfig.Cluster, AmFailoverEntry.GetPersistentStateKeyName(this.ServerName))) { amPersistentClusdbState.DeleteProperty("TimeCreated"); amPersistentClusdbState.DeleteProperty("ReasonCode"); } }
// Token: 0x06000625 RID: 1573 RVA: 0x0001E5D4 File Offset: 0x0001C7D4 internal static AmFailoverEntry ReadFromPersistentStore(AmServerName serverName) { AmFailoverEntry amFailoverEntry = null; using (AmPersistentClusdbState amPersistentClusdbState = new AmPersistentClusdbState(AmSystemManager.Instance.Config.DagConfig.Cluster, AmFailoverEntry.GetPersistentStateKeyName(serverName))) { bool flag = false; string text = amPersistentClusdbState.ReadProperty <string>("TimeCreated", out flag); if (string.IsNullOrEmpty(text)) { text = ExDateTime.MinValue.ToString("o"); } if (flag) { amFailoverEntry = new AmFailoverEntry(); bool flag2; string value = amPersistentClusdbState.ReadProperty <string>("ReasonCode", out flag2); if (string.IsNullOrEmpty(value)) { value = AmDbActionReason.NodeDown.ToString(); } AmDbActionReason reasonCode; EnumUtility.TryParse <AmDbActionReason>(value, out reasonCode, AmDbActionReason.NodeDown, true); amFailoverEntry.ServerName = serverName; amFailoverEntry.TimeCreated = ExDateTime.Parse(ExTimeZone.CurrentTimeZone, text); amFailoverEntry.ReasonCode = reasonCode; amFailoverEntry.Delay = TimeSpan.FromSeconds((double)RegistryParameters.TransientFailoverSuppressionDelayInSec); } } return(amFailoverEntry); }
// Token: 0x06000627 RID: 1575 RVA: 0x0001E700 File Offset: 0x0001C900 internal void WriteToPersistentStore() { AmConfig config = AmSystemManager.Instance.Config; if (config != null && config.DagConfig != null) { using (AmPersistentClusdbState amPersistentClusdbState = new AmPersistentClusdbState(config.DagConfig.Cluster, AmFailoverEntry.GetPersistentStateKeyName(this.ServerName))) { amPersistentClusdbState.WriteProperty <string>("ReasonCode", this.ReasonCode.ToString()); amPersistentClusdbState.WriteProperty <string>("TimeCreated", this.TimeCreated.ToString("o")); return; } } throw new AmServiceShuttingDownException(); }