Beispiel #1
0
 public NodeOverTheNetwork()
 {
     masterHost = new DistributedHashTableMasterHost();
     storageHost = new DistributedHashTableStorageHost(masterUri);
     masterHost.Start();
     storageHost.Start();
 }
            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();
            }
            public CanCommunicateWithMasterUsingClientProxy()
            {
                masterHost = new DistributedHashTableMasterHost();

                masterHost.Start();

                masterProxy = new DistributedHashTableMasterClient(new Uri("rhino.dht://localhost:2200"));
            }
Beispiel #4
0
 public JoiningToCluster()
 {
     masterHost = new DistributedHashTableMasterHost();
     storageHostA = new DistributedHashTableStorageHost(masterUri);
     storageHostB = new DistributedHashTableStorageHost(masterUri, "nodeB", 2203);
     masterHost.Start();
     storageHostA.Start();
 }