예제 #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();
            }
예제 #2
0
 public void Dispose()
 {
     host.Dispose();
 }
예제 #3
0
 public void Dispose()
 {
     storageHostB.Dispose();
     storageHostA.Dispose();
     masterHost.Dispose();
 }
예제 #4
0
 public void Dispose()
 {
     masterHost.Dispose();
 }