private void RunFixedPartitionResolver()
        {
            CacheHelper.SetupJavaServers(true, "cacheserver1_fpr.xml",
                                         "cacheserver2_fpr.xml", "cacheserver3_fpr.xml");
            CacheHelper.StartJavaLocator(1, "GFELOC");
            Util.Log("Locator 1 started.");
            CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1);
            Util.Log("Cacheserver 1 started.");
            CacheHelper.StartJavaServerWithLocators(2, "GFECS2", 1);
            Util.Log("Cacheserver 2 started.");
            CacheHelper.StartJavaServerWithLocators(3, "GFECS3", 1);
            Util.Log("Cacheserver 3 started.");

            var putGetTest = new PutGetTests();

            _client1.Call(CreateTCRegions_Pool1, PartitionRegion1,
                          CacheHelper.Locators, "__TESTPOOL1_", false);
            Util.Log("Client 1 (pool locators) PartitionRegion1 created");

            _client1.Call(CreateTCRegions_Pool1, PartitionRegion2,
                          CacheHelper.Locators, "__TESTPOOL1_", false);
            Util.Log("Client 1 (pool locators) PartitionRegion2 created");

            _client1.Call(CreateTCRegions_Pool1, PartitionRegion3,
                          CacheHelper.Locators, "__TESTPOOL1_", false);
            Util.Log("Client 1 (pool locators) PartitionRegion3 created");

            _client1.Call(putGetTest.SetRegion, PartitionRegion1);
            putGetTest.DoPRSHFixedPartitionResolverTasks(_client1, PartitionRegion1);

            _client1.Call(putGetTest.SetRegion, PartitionRegion2);
            putGetTest.DoPRSHFixedPartitionResolverTasks(_client1, PartitionRegion2);

            _client1.Call(putGetTest.SetRegion, PartitionRegion3);
            putGetTest.DoPRSHFixedPartitionResolverTasks(_client1, PartitionRegion3);

            _client1.Call(Close);
            Util.Log("Client 1 closed");

            _client2.Call(Close);
            Util.Log("Client 2 closed");

            CacheHelper.StopJavaServer(1);
            Util.Log("Cacheserver 1 stopped.");

            CacheHelper.StopJavaServer(2);
            Util.Log("Cacheserver 2 stopped.");

            CacheHelper.StopJavaServer(3);
            Util.Log("Cacheserver 3 stopped.");

            CacheHelper.StopJavaLocator(1);
            Util.Log("Locator 1 stopped.");

            CacheHelper.ClearEndpoints();
            CacheHelper.ClearLocators();
        }
        private void RunPartitionResolver()
        {
            CacheHelper.SetupJavaServers(true, "cacheserver1_pr.xml",
                                         "cacheserver2_pr.xml", "cacheserver3_pr.xml");
            CacheHelper.StartJavaLocator(1, "GFELOC");
            Util.Log("Locator 1 started.");
            CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1);
            Util.Log("Cacheserver 1 started.");
            CacheHelper.StartJavaServerWithLocators(2, "GFECS2", 1);
            Util.Log("Cacheserver 2 started.");
            CacheHelper.StartJavaServerWithLocators(3, "GFECS3", 1);
            Util.Log("Cacheserver 3 started.");

            var putGetTest = new PutGetTests();

            // Create and Add partition resolver to the regions.
            //CustomPartitionResolver<object> cpr = CustomPartitionResolver<object>.Create();

            _client1.Call(CreateTCRegions_Pool2_WithPartitionResolver, RegionNames,
                          CacheHelper.Locators, "__TESTPOOL1_", false, true);
            Util.Log("Client 1 (pool locators) regions created");
            _client2.Call(CreateTCRegions_Pool2_WithPartitionResolver, RegionNames,
                          CacheHelper.Locators, "__TESTPOOL1_", false, true);
            Util.Log("Client 2 (pool locators) regions created");

            _client1.Call(putGetTest.SetRegion, RegionNames[1]);
            _client2.Call(putGetTest.SetRegion, RegionNames[1]);
            putGetTest.DoPRSHPartitionResolverTasks(_client1, _client2, RegionNames[1]);

            _client1.Call(putGetTest.SetRegion, RegionNames[0]);
            _client2.Call(putGetTest.SetRegion, RegionNames[0]);
            putGetTest.DoPRSHPartitionResolverTasks(_client1, _client2, RegionNames[0]);

            _client1.Call(Close);
            Util.Log("Client 1 closed");

            _client2.Call(Close);
            Util.Log("Client 2 closed");

            CacheHelper.StopJavaServer(1);
            Util.Log("Cacheserver 1 stopped.");

            CacheHelper.StopJavaServer(2);
            Util.Log("Cacheserver 2 stopped.");

            CacheHelper.StopJavaServer(3);
            Util.Log("Cacheserver 3 stopped.");

            CacheHelper.StopJavaLocator(1);
            Util.Log("Locator 1 stopped.");

            CacheHelper.ClearEndpoints();
            CacheHelper.ClearLocators();
        }
        private void RunCheckPutGet()
        {
            CacheHelper.SetupJavaServers(true, "cacheServer_pdxreadserialized.xml");
            CacheHelper.StartJavaLocator(1, "GFELOC");
            Util.Log("Locator 1 started.");
            CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1);
            Util.Log("Cacheserver 1 started.");

            var putGetTest = new PutGetTests();

            _client1.Call(CreateTCRegions_Pool, RegionNames,
                          CacheHelper.Locators, "__TESTPOOL1_", false);
            Util.Log("Client 1 (pool locators) regions created");
            _client2.Call(CreateTCRegions_Pool, RegionNames,
                          CacheHelper.Locators, "__TESTPOOL1_", false);
            Util.Log("Client 2 (pool locators) regions created");

            _client1.Call(putGetTest.SetRegion, RegionNames[0]);
            _client2.Call(putGetTest.SetRegion, RegionNames[0]);

            var dtTicks = DateTime.Now.Ticks;

            CacheableHelper.RegisterBuiltins(dtTicks);

            putGetTest.TestAllKeyValuePairs(_client1, _client2,
                                            RegionNames[0], true, dtTicks);

            _client1.Call(Close);
            Util.Log("Client 1 closed");
            _client2.Call(Close);
            Util.Log("Client 2 closed");

            CacheHelper.StopJavaServer(1);
            Util.Log("Cacheserver 1 stopped.");

            CacheHelper.StopJavaLocator(1);
            Util.Log("Locator 1 stopped.");

            CacheHelper.ClearEndpoints();
            CacheHelper.ClearLocators();
        }
        private void RunTradeKeyResolver()
        {
            CacheHelper.SetupJavaServers(true, "cacheserver1_TradeKey.xml",
                                         "cacheserver2_TradeKey.xml", "cacheserver3_TradeKey.xml");
            CacheHelper.StartJavaLocator(1, "GFELOC");
            Util.Log("Locator 1 started.");
            CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1);
            Util.Log("Cacheserver 1 started.");
            CacheHelper.StartJavaServerWithLocators(2, "GFECS2", 1);
            Util.Log("Cacheserver 2 started.");
            CacheHelper.StartJavaServerWithLocators(3, "GFECS3", 1);
            Util.Log("Cacheserver 3 started.");

            _client1.Call(CreateTCRegion2, TradeKeyRegion, true, true, TradeKeyResolver.Create(),
                          CacheHelper.Locators, true);
            Util.Log("Client 1 (pool locators) region created");

            var putGetTest = new PutGetTests();

            _client1.Call(putGetTest.DoPRSHTradeResolverTasks, TradeKeyRegion);

            _client1.Call(Close);
            Util.Log("Client 1 closed");

            CacheHelper.StopJavaServer(1);
            Util.Log("Cacheserver 1 stopped.");

            CacheHelper.StopJavaServer(2);
            Util.Log("Cacheserver 2 stopped.");

            CacheHelper.StopJavaServer(3);
            Util.Log("Cacheserver 3 stopped.");

            CacheHelper.StopJavaLocator(1);
            Util.Log("Locator 1 stopped.");

            CacheHelper.ClearEndpoints();
            CacheHelper.ClearLocators();
        }
        private void RunCheckPutGetWithAppDomain()
        {
            CacheHelper.SetupJavaServers(true, "cacheServer_pdxreadserialized.xml");
            CacheHelper.StartJavaLocator(1, "GFELOC");
            Util.Log("Locator 1 started.");
            CacheHelper.StartJavaServerWithLocators(1, "GFECS1", 1);
            Util.Log("Cacheserver 1 started.");

            var putGetTest = new PutGetTests();

            _client1.Call(InitializeAppDomain);
            var dtTime = DateTime.Now.Ticks;

            _client1.Call(CreateTCRegions_Pool_AD, RegionNames,
                          CacheHelper.Locators, "__TESTPOOL1_", false, false, dtTime);
            Util.Log("Client 1 (pool locators) regions created");

            _client1.Call(SetRegionAD, RegionNames[0]);
            //m_client2.Call(putGetTest.SetRegion, RegionNames[0]);

            // CacheableHelper.RegisterBuiltins();

            //putGetTest.TestAllKeyValuePairs(m_client1, m_client2,
            //RegionNames[0], true, pool);
            _client1.Call(TestAllKeyValuePairsAD, RegionNames[0], true, dtTime);
            //m_client1.Call(CloseCacheAD);
            Util.Log("Client 1 closed");

            CacheHelper.CloseCache();

            CacheHelper.StopJavaServer(1);
            Util.Log("Cacheserver 1 stopped.");

            CacheHelper.StopJavaLocator(1);
            Util.Log("Locator 1 stopped.");

            CacheHelper.ClearEndpoints();
            CacheHelper.ClearLocators();
        }