public void AddCollection(CollectionInfo collection) { lock (Collections) { Collections.Add(collection.Name, collection); } }
public void AddCollection(string name, CollectionInfo collection) { lock (Collections) { Collections.Add(name, collection); } }
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); }