Ejemplo n.º 1
0
        public Master()
        {
            Console.WriteLine(Environment.NewLine + "Welcome to XAP.NET 11 Master!" + Environment.NewLine);
            try
            {
                TxnManager = GigaSpacesFactory.CreateDistributedTransactionManager();
                Console.WriteLine("*** Connected to space  From Master.");
                int numOfTrades = TradeSpaceProxy.Count(new Trade());
                NumberOfJobs = (int)(numOfTrades / (NumberOfTask * tradesPerTask));
                Console.WriteLine("*** NumberOfJobs=" + NumberOfJobs);
                Console.WriteLine("Rate is: " + (int)(Rate * 100) + "%");
                Console.WriteLine();
                InitIdsMap(numOfTrades);

                GenenateJobs();
                stopWatch.Stop();
                Console.WriteLine();
                DisplayResults();
                Console.ReadKey();
                Console.ReadKey();
                Console.WriteLine(Environment.NewLine + "NPV Calculation Example finished successfully!" + Environment.NewLine);
            }
            catch (Exception ex)
            {
                Console.WriteLine(Environment.NewLine + "NPV Calculation Example failed: " + ex);
            }
        }
Ejemplo n.º 2
0
    public void writeUser()
    {
        service.writeUser();
        int count = proxy.Count(new User());

        Assert.AreEqual(1, count);
    }