Example #1
0
        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;
        }
Example #2
0
 public CassandraReplicationStrategyFactory(IOptionsMonitor <CassandraProviderOptions> optionsMonitor)
 {
     this.options = optionsMonitor.CurrentValue;
 }
Example #3
0
 private void Changed(CassandraProviderOptions newOptions)
 {
     options           = newOptions;
     optionsHasChanged = true;
 }