public void StepOne(string locators) { CacheHelper.CreateTCRegion_Pool <object, object>(QueryRegionNames[0], true, true, null, locators, "__TESTPOOL1_", true); CacheHelper.CreateTCRegion_Pool <object, object>(QueryRegionNames[1], true, true, null, locators, "__TESTPOOL1_", true); CacheHelper.CreateTCRegion_Pool <object, object>(QueryRegionNames[2], true, true, null, locators, "__TESTPOOL1_", true); CacheHelper.CreateTCRegion_Pool <object, object>(QueryRegionNames[3], true, true, null, locators, "__TESTPOOL1_", true); IRegion <object, object> region = CacheHelper.GetRegion <object, object>(QueryRegionNames[0]); Apache.Geode.Client.RegionAttributes <object, object> regattrs = region.Attributes; region.CreateSubRegion(QueryRegionNames[1], regattrs); }
private IRegion <object, object> CreateSubRegion(IRegion <object, object> region, string subRegionName, string libraryName, string factoryFunctionName) { var regionAttributesFactory = new RegionAttributesFactory <object, object>(region.Attributes); Properties <string, string> sqliteProperties = new Properties <string, string>(); sqliteProperties.Insert("PageSize", "65536"); sqliteProperties.Insert("MaxPageCount", "512000000"); String sqlite_dir = "SqLiteDir" + Process.GetCurrentProcess().Id.ToString(); sqliteProperties.Insert("PersistenceDirectory", sqlite_dir); regionAttributesFactory.SetPersistenceManager(libraryName, factoryFunctionName, sqliteProperties); IRegion <object, object> subRegion = region.CreateSubRegion(subRegionName, regionAttributesFactory.Create()); Assert.IsNotNull(subRegion, "Expected region to be non null"); Assert.IsTrue(File.Exists(GetSqLiteFileName(sqlite_dir, subRegionName)), "Persistence file is not present"); DoNput(subRegion, 50); DoNget(subRegion, 50); return(subRegion); }