示例#1
0
 public void AddCollection(CollectionInfo collection)
 {
     lock (Collections)
     {
         Collections.Add(collection.Name, collection);
     }
 }
示例#2
0
 public void AddCollection(string name, CollectionInfo collection)
 {
     lock (Collections)
     {
         Collections.Add(name, collection);
     }
 }
示例#3
0
        public object Clone()
        {
            CollectionInfo collectionInfo = new CollectionInfo();

            collectionInfo.Name        = Name;
            collectionInfo.ParitionKey = ParitionKey;
            collectionInfo.Statistics  = Statistics;
            //todo: what type of clone is thiss below
            //collectionInfo.DataDistribution = DataDistribution;
            collectionInfo._distributionStrategy = DistributionStrategy != null?DataDistribution.Clone() as IDistributionStrategy : null;

            collectionInfo.CollectionShard = CollectionShard;
            collectionInfo.UID             = UID;
            return(collectionInfo);
        }