public void run() { GemFireCacheImpl cache = GemFireCacheImpl.getInstance(); RegionFactory rf = cache.createRegionFactory(RegionShortcut.REPLICATE); getLogWriter().info("Creating Dist Region"); rf.create("testRegion1"); rf.create("testRegion2"); rf.create("testRegion3"); Region r1 = cache.getRegion("/testRegion1"); rf.createSubregion(r1, "testSubRegion1"); Region r2 = cache.getRegion("/testRegion2"); rf.createSubregion(r2, "testSubRegion2"); Region r3 = cache.getRegion("/testRegion3"); rf.createSubregion(r3, "testSubRegion3"); for(int i = offset ; i< offset + 200 ; i++){ r1.put(new Integer(i), new Integer(i)); r2.put(new Integer(i), new Integer(i)); r3.put(new Integer(i), new Integer(i)); } } });
currentRegion = fac.createSubregion(currentRegion, "region_" + ++count); fac.createSubregion(currentRegion, "region_" + ++count); fac.createSubregion(fanoutParent, existingRegion.getName());
r1sr1 = factory.createSubregion(r1, r1sr1Name); assertBasicRegionFunctionality(r1sr1, r1sr1Name); try { factory.createSubregion(r1, r1sr1Name); fail("Expected RegionExistsException"); factory.createSubregion(r2, "shouldNotBePossible"); fail("Expected a RegionDestroyedException"); } catch (RegionDestroyedException expected) {
createdRegion = factory.createSubregion(parentRegion, regionName); } else { createdRegion = factory.create(regionName);
createdRegion = factory.createSubregion(parentRegion, regionName); } else { createdRegion = factory.create(regionName);