public CassandraProvider(IOptionsMonitor <CassandraProviderOptions> optionsMonitor, IKeyspaceNamingStrategy keyspaceNamingStrategy, ICassandraReplicationStrategy replicationStrategy, ILogger <CassandraProvider> logger, IInitializer initializer = null) { if (optionsMonitor is null) { throw new ArgumentNullException(nameof(optionsMonitor)); } if (keyspaceNamingStrategy is null) { throw new ArgumentNullException(nameof(keyspaceNamingStrategy)); } if (replicationStrategy is null) { throw new ArgumentNullException(nameof(replicationStrategy)); } this.options = optionsMonitor.CurrentValue; this.keyspaceNamingStrategy = keyspaceNamingStrategy; this.replicationStrategy = replicationStrategy; this.initializer = initializer; this.logger = logger; }
public CassandraReplicationStrategyFactory(IOptionsMonitor <CassandraProviderOptions> optionsMonitor) { this.options = optionsMonitor.CurrentValue; }
private void Changed(CassandraProviderOptions newOptions) { options = newOptions; optionsHasChanged = true; }