コード例 #1
0
 public bool AddServerToShard(string configCluster, string clusterUID, Address[] configServers, string databaseCluster, string shard, string shardUid, int shardPort, bool start, Common.Configuration.ClusterConfiguration clusterConfig)
 {
     try
     {
         ManagementCommand command = GetManagementCommand(ConfigurationCommandUtil.MethodName.AddServerToShard);
         command.Parameters.AddParameter(configCluster);
         command.Parameters.AddParameter(clusterUID);
         command.Parameters.AddParameter(configServers);
         command.Parameters.AddParameter(databaseCluster);
         command.Parameters.AddParameter(shard);
         command.Parameters.AddParameter(shardUid);
         command.Parameters.AddParameter(shardPort);
         command.Parameters.AddParameter(start);
         command.Parameters.AddParameter(clusterConfig);
         return((bool)ExecuteCommandOnMgtServer(command, true));
     }
     catch (System.Exception e)
     {
         throw e;
     }
 }
コード例 #2
0
        public bool AddServerToShard(string configCluster, string clusterUID, Address[] configServers, string databaseCluster, string shard, string shardUid, int shardPort, bool start, Common.Configuration.ClusterConfiguration clusterConfig)
        {
            bool nodeAdded = false;

            try
            {
                nodeAdded = dbMgtServer.AddServerToShard(configCluster, clusterUID, configServers, databaseCluster, shard, shardUid, shardPort, start, clusterConfig);
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
            return(nodeAdded);
        }