public Region getParentRegion() { return this.realRegion.getParentRegion(); }
public Region getParentRegion() { return this.region.getParentRegion(); }
public Region getParentRegion() { return this.realRegion.getParentRegion(); }
public Region getParentRegion() { return this.region.getParentRegion(); }
public String getParentRegion() { if (region.getParentRegion() != null) { return region.getParentRegion().getName(); } return null; }
public String getParentRegion() { if (region.getParentRegion() != null) { return region.getParentRegion().getName(); } return null; }
public void run2() throws CacheException { //DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region"); Region region = createRegion(name); assertTrue(!region.isDestroyed()); Region root = region.getParentRegion(); assertTrue(!root.isDestroyed()); } };
/** * Handles the event of a region being created: logs call and * adds the name of this listener to the ListenerBB.InvokedListeners list (String) */ public void afterRegionCreate(RegionEvent event) { logCall("afterRegionCreate", event); if (event.getRegion().getParentRegion() != null) { // if the parent is null, this is the creation of the root region updateBB(event.getRegion().getParentRegion().getName()); } }
/** * Handles the event of a region being live: logs call and * adds the name of this listener to the ListenerBB.InvokedListeners list (String) */ public void afterRegionLive(RegionEvent event) { logCall("afterRegionLive", event); if (event.getRegion().getParentRegion() != null) { // if the parent is null, this is the creation of the root region updateBB(event.getRegion().getParentRegion().getName()); } }
public Map<String, Object> getDriverRegionsForOuterJoins() { Map<String, Object> map = new HashMap<String, Object>(); if (isSpecialCaseOFOuterJoins) { for (Region<?, ?> reg : this.logicalLeftTableList) { if (reg.getAttributes().getPartitionAttributes() != null) { break; } String regName = (reg.getParentRegion().getName() + "." + reg.getName()) .toUpperCase(); map.put(regName, null); } } else { return null; } return map; }
public Map<String, Object> getDriverRegionsForOuterJoins() { Map<String, Object> map = new HashMap<String, Object>(); if (isSpecialCaseOFOuterJoins) { for (Region<?, ?> reg : this.logicalLeftTableList) { if (reg.getAttributes().getPartitionAttributes() != null) { break; } String regName = (reg.getParentRegion().getName() + "." + reg.getName()) .toUpperCase(); map.put(regName, null); } } else { return null; } return map; }
public Map<String, Object> getDriverRegionsForOuterJoins() { Map<String, Object> map = new HashMap<String, Object>(); if (isSpecialCaseOFOuterJoins) { for (Region<?, ?> reg : this.logicalLeftTableList) { if (reg.getAttributes().getPartitionAttributes() != null) { break; } String regName = (reg.getParentRegion().getName() + "." + reg.getName()) .toUpperCase(); map.put(regName, null); } } else { return null; } return map; }
public void run2() throws CacheException { //DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to put"); Region region = getRootRegion().getSubregion(name); region.put(key, value); assertTrue(!region.isDestroyed()); assertTrue(!region.getParentRegion().isDestroyed()); } };
public RegionInformation(Region<?, ?> region, boolean recursive) { this.name = region.getFullPath().substring(1); this.path = region.getFullPath().substring(1); this.scope = region.getAttributes().getScope(); this.dataPolicy = region.getAttributes().getDataPolicy(); if (region.getParentRegion() == null) { this.isRoot = true; if (recursive) { Set<Region<?,?>> subRegions = region.subregions(recursive); subRegionInformationSet = getSubRegions(subRegions); } } else { this.isRoot = false; this.parentRegion = region.getParentRegion().getFullPath(); } }
public RegionInformation(Region<?, ?> region, boolean recursive) { this.name = region.getFullPath().substring(1); this.path = region.getFullPath().substring(1); this.scope = region.getAttributes().getScope(); this.dataPolicy = region.getAttributes().getDataPolicy(); if (region.getParentRegion() == null) { this.isRoot = true; if (recursive) { Set<Region<?,?>> subRegions = region.subregions(recursive); subRegionInformationSet = getSubRegions(subRegions); } } else { this.isRoot = false; this.parentRegion = region.getParentRegion().getFullPath(); } }
public void beforeCreate(EntryEvent arg0) throws CacheWriterException { String key = (String) arg0.getKey(); String newValue = (String) arg0.getNewValue(); String oldValue = (String) arg0.getOldValue(); String query = "insert into " + tableName + " values (" + (new Integer(key)).intValue() + " , '" + newValue + "')"; executeQuery(query); try { Region r = arg0.getRegion(); Region newRegion = r.getParentRegion().getSubregion("nextemployee"); newRegion.put(key, newValue); } catch (TimeoutException te) { throw new CacheClosedException("Beforecreate timeout exception" + te); } }
public void beforeUpdate(EntryEvent arg0) throws CacheWriterException { String key = (String) arg0.getKey(); String newValue = (String) arg0.getNewValue(); String oldValue = (String) arg0.getOldValue(); String query = "update " + tableName + " set name = '" + newValue + "' where id = (" + (new Integer(key)).intValue() + ")"; executeQuery(query); try { Region r = arg0.getRegion(); Region newRegion = r.getParentRegion().getSubregion("nextemployee"); newRegion.put(key, newValue); } catch (TimeoutException te) { throw new CacheClosedException("Beforecreate timeout exception" + te); } }
/** * Tests the {@link Region#getName} method */ public void testGetName() throws CacheException { String name = this.getUniqueName(); Region region = createRegion(name); assertEquals(name, region.getName()); assertEquals("root", region.getParentRegion().getName()); }
/** * Tests the {@link Region#getParentRegion} method */ public void testGetParentRegion() throws CacheException { if (!supportsSubregions()) { return; } String name = this.getUniqueName(); Region region = createRegion(name); assertEquals(getRootRegion(), region.getParentRegion()); Region sub = region.createSubregion("SUB", region.getAttributes()); assertEquals(region, sub.getParentRegion()); assertSame(sub, region.getSubregion("SUB")); assertNotNull(sub.getAttributes()); }
/** * Tests the {@link Region#getFullPath} method */ public void testGetPathFromRoot() throws CacheException { if (!supportsSubregions()) { return; } String name = this.getUniqueName(); Region region = createRegion(name); String fullPath = "/root/" + name; assertEquals(fullPath, region.getFullPath()); assertEquals("/root", region.getParentRegion().getFullPath()); Region sub = region.createSubregion("SUB", region.getAttributes()); assertEquals(fullPath + "/SUB", sub.getFullPath()); }