public Region createRegion(String name, String refid) throws RegionExistsException, TimeoutException { RegionCreation region = new RegionCreation(this, name, refid); this.addRootRegion(region); return region; }
public Region createRegion(String name, String refid) throws RegionExistsException, TimeoutException { RegionCreation region = new RegionCreation(this, name, refid); this.addRootRegion(region); return region; }
/** * After popping the current <code>RegionCreation</code> off the stack, if * the element on top of the stack is a <code>RegionCreation</code>, then * it is the parent region. */ private void endRegion() throws RegionExistsException { RegionCreation region = (RegionCreation) stack.pop(); boolean isRoot = false; if (stack.isEmpty()) { isRoot = true; } else if (!(stack.peek() instanceof RegionCreation)) { isRoot = true; } if (isRoot) { this.cache.addRootRegion(region); } else { RegionCreation parent = (RegionCreation) stack.peek(); parent.addSubregion(region.getName(), region); } }
/** * After popping the current <code>RegionCreation</code> off the stack, if * the element on top of the stack is a <code>RegionCreation</code>, then * it is the parent region. */ private void endRegion() throws RegionExistsException { RegionCreation region = (RegionCreation) stack.pop(); boolean isRoot = false; if (stack.isEmpty()) { isRoot = true; } else if (!(stack.peek() instanceof RegionCreation)) { isRoot = true; } if (isRoot) { this.cache.addRootRegion(region); } else { RegionCreation parent = (RegionCreation) stack.peek(); parent.addSubregion(region.getName(), region); } }
public Region createRegion(String name, RegionAttributes attrs) throws RegionExistsException, TimeoutException { if (attrs instanceof RegionAttributesCreation) { ((RegionAttributesCreation) attrs).inheritAttributes(this); ((RegionAttributesCreation) attrs).prepareForValidation(); } AttributesFactory.validateAttributes(attrs); RegionCreation region = new RegionCreation(this, name, null); region.setAttributes(attrs); this.addRootRegion(region); return region; } public Region createRegion(String name, String refid) throws RegionExistsException, TimeoutException {
public Region createRegion(String name, RegionAttributes attrs) throws RegionExistsException, TimeoutException { if (attrs instanceof RegionAttributesCreation) { ((RegionAttributesCreation) attrs).inheritAttributes(this); ((RegionAttributesCreation) attrs).prepareForValidation(); } AttributesFactory.validateAttributes(attrs); RegionCreation region = new RegionCreation(this, name, null); region.setAttributes(attrs); this.addRootRegion(region); return region; } public Region createRegion(String name, String refid) throws RegionExistsException, TimeoutException {