public async Task InitializeMembershipTable(GlobalConfiguration config, bool tryInitTableVersion, Logger traceLogger) { logger = traceLogger; deploymentId = config.DeploymentId; if (logger.IsVerbose3) { logger.Verbose3("SqlMembershipTable.InitializeMembershipTable called."); } //This initializes all of Orleans operational queries from the database using a well known view //and assumes the database with appropriate defintions exists already. orleansQueries = await RelationalOrleansQueries.CreateInstance(config.AdoInvariant, config.DataConnectionString); // even if I am not the one who created the table, // try to insert an initial table version if it is not already there, // so we always have a first table version row, before this silo starts working. if (tryInitTableVersion) { var wasCreated = await InitTableAsync(); if (wasCreated) { logger.Info("Created new table version row."); } } }
public async Task InitializeMembershipTable(bool tryInitTableVersion) { if (logger.IsEnabled(LogLevel.Trace)) { logger.LogTrace("AdoNetClusteringTable.InitializeMembershipTable called."); } //This initializes all of Orleans operational queries from the database using a well known view //and assumes the database with appropriate definitions exists already. var grainReferenceConverter = this.serviceProvider.GetRequiredService <GrainReferenceKeyStringConverter>(); orleansQueries = await RelationalOrleansQueries.CreateInstance( clusteringTableOptions.Invariant, clusteringTableOptions.ConnectionString, grainReferenceConverter); // even if I am not the one who created the table, // try to insert an initial table version if it is not already there, // so we always have a first table version row, before this silo starts working. if (tryInitTableVersion) { var wasCreated = await InitTableAsync(); if (wasCreated) { logger.LogInformation("Created new table version row."); } } }
public async Task InitializeGatewayListProvider() { if (logger.IsEnabled(LogLevel.Trace)) { logger.Trace("SqlMembershipTable.InitializeGatewayListProvider called."); } orleansQueries = await RelationalOrleansQueries.CreateInstance(options.AdoInvariant, options.ConnectionString, this.grainReferenceConverter); }
public async Task InitializeGatewayListProvider() { if (logger.IsEnabled(LogLevel.Trace)) { logger.LogTrace("AdoNetClusteringTable.InitializeGatewayListProvider called."); } var grainReferenceConverter = serviceProvider.GetRequiredService <GrainReferenceKeyStringConverter>(); orleansQueries = await RelationalOrleansQueries.CreateInstance(options.Invariant, options.ConnectionString, grainReferenceConverter); }
public async Task InitializeGatewayListProvider(ClientConfiguration config) { if (logger.IsEnabled(LogLevel.Trace)) { logger.Trace("SqlMembershipTable.InitializeGatewayListProvider called."); } deploymentId = config.DeploymentId; maxStaleness = config.GatewayListRefreshPeriod; orleansQueries = await RelationalOrleansQueries.CreateInstance(config.AdoInvariant, config.DataConnectionString, this.grainReferenceConverter); }
public async Task InitializeGatewayListProvider(ClientConfiguration config, Logger traceLogger) { logger = traceLogger; if (logger.IsVerbose3) { logger.Verbose3("SqlMembershipTable.InitializeGatewayListProvider called."); } deploymentId = config.DeploymentId; maxStaleness = config.GatewayListRefreshPeriod; orleansQueries = await RelationalOrleansQueries.CreateInstance(config.AdoInvariant, config.DataConnectionString); }
/// <summary> /// Initializes publisher /// </summary> /// <param name="name">Provider name</param> /// <param name="providerRuntime">Provider runtime API</param> /// <param name="config">Provider configuration</param> /// <returns></returns> public async Task Init(string name, IProviderRuntime providerRuntime, IProviderConfiguration config) { Name = name; logger = providerRuntime.GetLogger("SqlStatisticsPublisher"); string adoInvariant = AdoNetInvariants.InvariantNameSqlServer; if (config.Properties.ContainsKey("AdoInvariant")) { adoInvariant = config.Properties["AdoInvariant"]; } orleansQueries = await RelationalOrleansQueries.CreateInstance(adoInvariant, config.Properties["ConnectionString"]); }
/// <summary> /// Initializes publisher /// </summary> /// <param name="name">Provider name</param> /// <param name="providerRuntime">Provider runtime API</param> /// <param name="config">Provider configuration</param> /// <returns></returns> public async Task Init(string name, IProviderRuntime providerRuntime, IProviderConfiguration config) { Name = name; logger = providerRuntime.ServiceProvider.GetRequiredService <ILogger <AdoNetStatisticsPublisher> >(); this.grainReferenceConverter = providerRuntime.ServiceProvider.GetRequiredService <IGrainReferenceConverter>(); string adoInvariant = AdoNetInvariants.InvariantNameSqlServer; if (config.Properties.ContainsKey("AdoInvariant")) { adoInvariant = config.Properties["AdoInvariant"]; } orleansQueries = await RelationalOrleansQueries.CreateInstance(adoInvariant, config.Properties["ConnectionString"], this.grainReferenceConverter); }
public async Task Init(GlobalConfiguration config, TraceLogger logger) { serviceId = config.ServiceId.ToString(); deploymentId = config.DeploymentId; orleansQueries = await RelationalOrleansQueries.CreateInstance(config.AdoInvariantForReminders, config.DataConnectionStringForReminders); }
public async Task Init(GlobalConfiguration config, Logger logger) { serviceId = config.ServiceId.ToString(); orleansQueries = await RelationalOrleansQueries.CreateInstance(config.AdoInvariantForReminders, config.DataConnectionStringForReminders, this.grainReferenceConverter); }
async Task IClientMetricsDataPublisher.Init(ClientConfiguration config, IPAddress address, string clientId) { orleansQueries = await RelationalOrleansQueries.CreateInstance(config.AdoInvariant, config.DataConnectionString); }
public async Task Init() { var grainReferenceConverter = serviceProvider.GetRequiredService <GrainReferenceKeyStringConverter>(); this.orleansQueries = await RelationalOrleansQueries.CreateInstance(this.options.Invariant, this.options.ConnectionString, grainReferenceConverter); }
public async Task Init() { this.orleansQueries = await RelationalOrleansQueries.CreateInstance(this.adoNetOptions.InvariantForReminders, this.storageOptions.DataConnectionStringForReminders, this.grainReferenceConverter); }
public async Task Init() { this.orleansQueries = await RelationalOrleansQueries.CreateInstance(this.options.Invariant, this.options.ConnectionString, this.grainReferenceConverter); }