/** * Creates a root {@link Region} in a given <code>Cache</code> based on the description provided * by this <code>RegionCreation</code>. * */ 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(); extensionPoint.beforeCreate(cache); try { root = ((InternalCache) cache).basicCreateRegion(this.name, new AttributesFactory(this.attrs).create()); } catch (RegionExistsException ex) { root = ex.getRegion(); setMutableAttributes(root); } catch (RegionDestroyedException ex) { // Region was concurrently destroyed. cache.getLogger().warning( String.format("Region was globally destroyed during cache initialization: %s", this.name)); // do nothing } if (root != null) { fillIn(root); } }