Esempio n. 1
0
            public AfterRestart()
            {
                host = new DistributedHashTableMasterHost();

                host.Start();

                using (var storageHost = new DistributedHashTableStorageHost(masterUri))
                {
                    storageHost.Start();

                    var masterProxy = new DistributedHashTableMasterClient(masterUri);
                    while (true)
                    {
                        var topology = masterProxy.GetTopology();
                        if (topology.Segments.All(x => x.AssignedEndpoint != null))
                        {
                            break;
                        }
                        Thread.Sleep(100);
                    }
                }

                //restart
                host.Dispose();
                host = new DistributedHashTableMasterHost();
                host.Start();
            }
Esempio n. 2
0
 public NodeOverTheNetwork()
 {
     masterHost  = new DistributedHashTableMasterHost();
     storageHost = new DistributedHashTableStorageHost(masterUri);
     masterHost.Start();
     storageHost.Start();
 }
Esempio n. 3
0
 public JoiningToCluster()
 {
     masterHost   = new DistributedHashTableMasterHost();
     storageHostA = new DistributedHashTableStorageHost(masterUri);
     storageHostB = new DistributedHashTableStorageHost(masterUri, "nodeB", 2203);
     masterHost.Start();
     storageHostA.Start();
 }