public KeyedCassandraClientFactory(IKeyedObjectPool <Endpoint, ICassandraClient> pool, Config config)
 {
     KeyedCassandraClientFactory.monitor = new CassandraClientMonitor();
     this.pool = pool;
     if (config != null)
     {
         this.timeout = config.Timeout;
     }
 }
示例#2
0
        public Keyspace(
			ICassandraClient client,
			string keyspaceName,
			IDictionary<string, Dictionary<string, string>> description,
			ConsistencyLevel consistencyLevel,
			FailoverPolicy failoverPolicy,
			IKeyedObjectPool<Endpoint, ICassandraClient> pool,
			ICassandraClientMonitor monitor)
        {
            if (client == null)
                throw new ArgumentNullException("client");

            this.Client = client;
            this.ConsistencyLevel = consistencyLevel;
            this.Description = description;
            this.Name = keyspaceName;
            this.cassandra = client.Client as Cassandra.Client;
            this.FailoverPolicy = failoverPolicy;
            this.pool = pool;
            this.monitor = monitor;
            InitFailover();
        }
示例#3
0
        public Keyspace(
            ICassandraClient client,
            string keyspaceName,
            IDictionary <string, Dictionary <string, string> > description,
            ConsistencyLevel consistencyLevel,
            FailoverPolicy failoverPolicy,
            IKeyedObjectPool <Endpoint, ICassandraClient> pool,
            ICassandraClientMonitor monitor)
        {
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }

            this.Client           = client;
            this.ConsistencyLevel = consistencyLevel;
            this.Description      = description;
            this.Name             = keyspaceName;
            this.cassandra        = client.Client as Cassandra.Client;
            this.FailoverPolicy   = failoverPolicy;
            this.pool             = pool;
            this.monitor          = monitor;
            InitFailover();
        }
示例#4
0
 public KeyspaceFactory(ICassandraClientMonitor monitor)
 {
     this.monitor = monitor;
 }
示例#5
0
 public KeyspaceFactory(ICassandraClientMonitor monitor)
 {
     this.monitor = monitor;
 }