コード例 #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;
        }
コード例 #2
0
ファイル: CassandraClient.cs プロジェクト: nury01/hectorsharp
        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;
        }
コード例 #3
0
ファイル: CassandraClient.cs プロジェクト: nury01/hectorsharp
 internal CassandraClient(Apache.Cassandra.Cassandra.Iface thriftClient, KeyspaceFactory keyspaceFactory, Endpoint endpoint, IKeyedObjectPool<Endpoint, ICassandraClient> pool)
     : this(keyspaceFactory, endpoint, pool)
 {
     cassandra = thriftClient;
 }
コード例 #4
0
 internal CassandraClient(Apache.Cassandra.Cassandra.Iface thriftClient, KeyspaceFactory keyspaceFactory, Endpoint endpoint, IKeyedObjectPool <Endpoint, ICassandraClient> pool)
     : this(keyspaceFactory, endpoint, pool)
 {
     cassandra = thriftClient;
 }