Example #1
0
        internal CassandraClient(KeyspaceFactory keyspaceFactory, Endpoint endpoint, IKeyedObjectPool<Endpoint, ICassandraClient> pool)
        {
            this.mySerial = serial.Increment();
            this.keyspaceFactory = keyspaceFactory;

            if (endpoint == null)
                throw new ArgumentNullException("endpoint");

            if (!port.HasValue)
                port = endpoint.Port;

            if (port.Value != endpoint.Port)
            {
                if (this.pool != null)
                    this.pool.Clear();
                port = endpoint.Port;
            }

            this.Endpoint = endpoint;
            this.pool = pool;
        }
Example #2
0
 internal CassandraClient(Apache.Cassandra060b3.Cassandra.Client thriftClient, KeyspaceFactory keyspaceFactory, Endpoint endpoint, IKeyedObjectPool<Endpoint, ICassandraClient> pool)
     : this(keyspaceFactory, endpoint, pool)
 {
     Version = CassandraVersion.v0_6_0_beta_3;
     cassandra060 = thriftClient;
 }