public Proxy(string port, int bCount, List <string> nPorts) { proxyPort = port; bucketCount = bCount; nodePorts = nPorts; bst = new BucketShardTableService(); bst.LoadCurrentTable(); kbt = new KeyBucketTableService(); kbt.LoadCurrentTable(); }
public void Analize(KeyBucketTableService kbt, BucketShardTableService bst) { Dictionary <int, string> BSTable = bst.GetNewTable(); foreach (var row in BSTable) { if (row.Value != bst.GetTable()[row.Key]) { Reshard(bst.GetTable()[row.Key], row.Value, FindRowsFromBucket(row.Key, kbt.GetTable())); bst.ChangeShard(row.Key, BSTable[row.Key]); } } }