private void CalculateOverrides() { if (this.Globals.LivenessEnabled && this.Globals.LivenessType == GlobalConfiguration.LivenessProviderType.NotSpecified) { if (this.Globals.UseSqlSystemStore) { this.Globals.LivenessType = GlobalConfiguration.LivenessProviderType.SqlServer; } else if (this.Globals.UseAzureSystemStore) { this.Globals.LivenessType = GlobalConfiguration.LivenessProviderType.AzureTable; } else if (this.Globals.UseZooKeeperSystemStore) { this.Globals.LivenessType = GlobalConfiguration.LivenessProviderType.ZooKeeper; } else { this.Globals.LivenessType = GlobalConfiguration.LivenessProviderType.MembershipTableGrain; } } if (this.Globals.UseMockReminderTable) { this.Globals.SetReminderServiceType(GlobalConfiguration.ReminderServiceProviderType.MockTable); } else if (this.Globals.ReminderServiceType == GlobalConfiguration.ReminderServiceProviderType.NotSpecified) { if (this.Globals.UseSqlSystemStore) { this.Globals.SetReminderServiceType(GlobalConfiguration.ReminderServiceProviderType.SqlServer); } else if (this.Globals.UseAzureSystemStore) { this.Globals.SetReminderServiceType(GlobalConfiguration.ReminderServiceProviderType.AzureTable); } else if (this.Globals.UseZooKeeperSystemStore) { this.Globals.SetReminderServiceType(GlobalConfiguration.ReminderServiceProviderType.Disabled); } else { this.Globals.SetReminderServiceType(GlobalConfiguration.ReminderServiceProviderType.ReminderTableGrain); } } foreach (var p in this.overrideXml) { var n = new NodeConfiguration(this.Defaults); n.Load(ParseXml(new StringReader(p.Value))); n.InitNodeSettingsFromGlobals(this); this.Overrides[n.SiloName] = n; } }
/// <summary> /// Creates a configuration node for a given silo. /// </summary> /// <param name="siloName">Silo name.</param> /// <returns>NodeConfiguration associated with the specified silo.</returns> public NodeConfiguration CreateNodeConfigurationForSilo(string siloName) { var siloNode = new NodeConfiguration(this.Defaults) { SiloName = siloName }; siloNode.InitNodeSettingsFromGlobals(this); this.Overrides[siloName] = siloNode; return(siloNode); }