/** * Causes this region attributes to inherit all of the attributes of * its "parent" attributes specified by its <code>refid</code>. * * @param cache * Used to look up named region attributes * * @throws IllegalStateException * If no region attributes named <code>refid</code> exist. * * @since 4.1 */ void inheritAttributes(Cache cache) { inheritAttributes(cache, true); } void inheritAttributes(Cache cache, boolean setDefaultPool) {
/** * Causes this region attributes to inherit all of the attributes of * its "parent" attributes specified by its <code>refid</code>. * * @param cache * Used to look up named region attributes * * @throws IllegalStateException * If no region attributes named <code>refid</code> exist. * * @since 4.1 */ void inheritAttributes(Cache cache) { inheritAttributes(cache, true); } void inheritAttributes(Cache cache, boolean setDefaultPool) {
/** * Creates a new <code>RegionCreation</code> with the given name and * with the default <code>RegionAttributes</code>. */ public RegionCreation(CacheCreation cache, RegionCreation parent, String name, String refid) { this.cache = cache; if (parent != null) { this.fullPath = parent.getFullPath() + SEPARATOR + name; } else { this.fullPath = SEPARATOR + name; } this.name = name; this.refid = refid; this.attrs = new RegionAttributesCreation(this.cache); if (refid != null) { this.attrs.setRefid(refid); this.attrs.inheritAttributes(cache); } }
/** * Creates a new <code>RegionCreation</code> with the given name and * with the default <code>RegionAttributes</code>. */ public RegionCreation(CacheCreation cache, RegionCreation parent, String name, String refid) { this.cache = cache; if (parent != null) { this.fullPath = parent.getFullPath() + SEPARATOR + name; } else { this.fullPath = SEPARATOR + name; } this.name = name; this.refid = refid; this.attrs = new RegionAttributesCreation(this.cache); if (refid != null) { this.attrs.setRefid(refid); this.attrs.inheritAttributes(cache); } }
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 {
RegionAttributesCreation creation = (RegionAttributesCreation) getRegionAttributes(id); creation.inheritAttributes(cache, false);
RegionAttributesCreation creation = (RegionAttributesCreation) getRegionAttributes(id); creation.inheritAttributes(cache, false);
/** * Creates a root {@link Region} in a given <code>Cache</code> * based on the description provided by this * <code>RegionCreation</code>. * * @throws TimeoutException * @throws CacheWriterException * @throws RegionExistsException */ void createRoot(Cache cache) throws TimeoutException, CacheWriterException, RegionExistsException { Region root = null; // Validate the attributes before creating the root region this.attrs.inheritAttributes(cache); this.attrs.setIndexes(this.indexes); this.attrs.prepareForValidation(); try { root = ((GemFireCacheImpl)cache).basicCreateRegion(this.name, new AttributesFactory(this.attrs).create()); } catch (RegionExistsException ex) { root = ex.getRegion(); setMutableAttributes(root); } fillIn(root); } /**
this.attrs.inheritAttributes(cache); this.attrs.setIndexes(this.indexes); this.attrs.prepareForValidation();
this.attrs.inheritAttributes(parent.getCache()); this.attrs.prepareForValidation(); this.attrs.setIndexes(this.indexes);
RegionAttributesCreation creation = (RegionAttributesCreation) getRegionAttributes(id); creation.inheritAttributes(cache, false);
this.attrs.inheritAttributes(parent.getCache()); this.attrs.prepareForValidation(); this.attrs.setIndexes(this.indexes);
RegionAttributesCreation creation = (RegionAttributesCreation) getRegionAttributes(id); creation.inheritAttributes(cache, false);