Пример #1
0
        public bool CreateDatabase(string cluster, string shard, DatabaseConfiguration configuration, IDictionary <string, IDistributionStrategy> collectionStrategy)
        {
            try
            {
                bool isCreated = this.dbMgtServer.CreateDatabase(cluster, shard, configuration, collectionStrategy);
                if (isCreated)
                {
                    ResourceId resourceId;
                    ResourceId superResourceId;

                    Security.Impl.SecurityManager.GetSecurityInformation(Permission.Create_Database, configuration.Name, out resourceId, out superResourceId, cluster);

                    dbMgtServer.AddSecurityInformation(cluster, shard, resourceId, superResourceId, this._sessionId);
                }
                return(isCreated);
            }
            catch (System.Exception ex)
            {
                throw ex;
            }
        }