コード例 #1
0
        protected ICluster CreateTemporaryCluster(string creds = "creds-v1.zip", Action <Builder> act = null)
        {
            var cluster = CreateCluster(creds, act);

            ClusterInstances.Add(cluster);
            return(cluster);
        }
コード例 #2
0
        protected ICluster CreateTemporaryCluster(string creds = "creds-v1.zip", Action <Builder> act = null, bool withCredentials = true)
        {
            var cluster = CreateCluster(creds, act, withCredentials);

            ClusterInstances.Add(cluster);
            return(cluster);
        }
コード例 #3
0
        protected ICluster CreateCluster(string creds = "creds-v1.zip", Action <Builder> act = null)
        {
            var builder = Cassandra.Cluster.Builder();

            act?.Invoke(builder);
            builder = builder
                      .WithCloudSecureConnectionBundle(
                Path.Combine(((CloudCluster)TestCluster).SniHomeDirectory, "certs", "bundles", creds))
                      .WithPoolingOptions(
                new PoolingOptions().SetHeartBeatInterval(200))
                      .WithReconnectionPolicy(new ConstantReconnectionPolicy(100));
            var cluster = builder.Build();

            ClusterInstances.Add(cluster);

            return(cluster);
        }