コード例 #1
0
        public void ConsistentRingProvider_Test1()
        {
            SiloAddress            silo1 = SiloAddressUtils.NewLocalSiloAddress(0);
            ConsistentRingProvider ring  = new ConsistentRingProvider(silo1, NullLoggerFactory.Instance);

            output.WriteLine("Silo1 range: {0}. The whole ring is: {1}", ring.GetMyRange(), ring.ToString());

            ring.AddServer(SiloAddressUtils.NewLocalSiloAddress(1));
            output.WriteLine("Silo1 range: {0}. The whole ring is: {1}", ring.GetMyRange(), ring.ToString());

            ring.AddServer(SiloAddressUtils.NewLocalSiloAddress(2));
            output.WriteLine("Silo1 range: {0}. The whole ring is: {1}", ring.GetMyRange(), ring.ToString());
        }
コード例 #2
0
        public void ConsistentRingProvider_Test1()
        {
            SiloAddress            silo1 = SiloAddress.NewLocalAddress(0);
            ConsistentRingProvider ring  = new ConsistentRingProvider(silo1);

            Console.WriteLine("Silo1 range: {0}. The whole ring is: {1}", ring.GetMyRange(), ring.ToString());

            ring.AddServer(SiloAddress.NewLocalAddress(1));
            Console.WriteLine("Silo1 range: {0}. The whole ring is: {1}", ring.GetMyRange(), ring.ToString());

            ring.AddServer(SiloAddress.NewLocalAddress(2));
            Console.WriteLine("Silo1 range: {0}. The whole ring is: {1}", ring.GetMyRange(), ring.ToString());
        }