/** Creates a new instance of the resource pool. */ public static ResourcePool create(Catalog catalog) { return create(catalog, null); }
@Override public ResourcePool answer() throws Throwable { return ResourcePool.create(catalog); } })
/** Implementation method for resolving all {@link ResolvingProxy} instances. */ public void resolve() { facade.setCatalog(this); facade.resolve(); if (listeners == null) { listeners = new ArrayList<CatalogListener>(); } if (resourcePool == null) { resourcePool = ResourcePool.create(this); } }
public CatalogImpl() { facade = new DefaultCatalogFacade(this); // wrap the default catalog facade with the facade capable of handling isolated workspaces // behavior facade = new IsolatedCatalogFacade(facade); setFacade(facade); resourcePool = ResourcePool.create(this); }
/** * Test that the {@link FeatureType} cache returns the same instance every time. This is assumed * by some nasty code in other places that tampers with the CRS. If a new {@link FeatureType} is * constructed for the same {@link FeatureTypeInfo}, Bad Things Happen (TM). */ @Test public void testFeatureTypeCacheInstance() throws Exception { ResourcePool pool = ResourcePool.create(getCatalog()); FeatureTypeInfo info = getCatalog() .getFeatureTypeByName( MockData.LAKES.getNamespaceURI(), MockData.LAKES.getLocalPart()); FeatureType ft1 = pool.getFeatureType(info); FeatureType ft2 = pool.getFeatureType(info); FeatureType ft3 = pool.getFeatureType(info); assertSame(ft1, ft2); assertSame(ft1, ft3); }
@Test public void testAttributeCache() throws Exception { final Catalog catalog = getCatalog(); ResourcePool pool = ResourcePool.create(catalog);