@Override public void visit(CoverageStoreInfo coverageStore) { clear(coverageStore); }
@Override public void visit(StyleInfo style) { clear(style); } }
@Override public void visit(DataStoreInfo dataStore) { clear(dataStore); }
@Override public void visit(FeatureTypeInfo featureType) { clear(featureType); }
@Override public void visit(WMSStoreInfo wmsStore) { clear(wmsStore); }
@Override public void clear(FeatureTypeInfo info) { cleared = true; super.clear(info); } };
FeatureType getFeatureType(FeatureTypeInfo info, boolean handleProjectionPolicy) throws IOException { try { return tryGetFeatureType(info, handleProjectionPolicy); } catch (Exception ex) { LOGGER.log( Level.WARNING, "Error while getting feature type, flushing cache and retrying: {0}", ex.getMessage()); LOGGER.log(Level.FINE, "", ex); this.clear(info); this.flushDataStore(info); return tryGetFeatureType(info, handleProjectionPolicy); } }
/** * Writes a raw style to configuration. * * @param style The configuration for the style. * @param in input stream representing the raw a style. */ public void writeStyle(StyleInfo style, InputStream in) throws IOException { synchronized (styleCache) { Resource styleFile = dataDir().style(style); writeStyle(in, styleFile); clear(style); } }
/** * Serializes a style to configuration optionally formatting the style when writing it. * * @param info The configuration for the style. * @param style The style object. * @param format Whether to format the style */ public void writeSLD(StyleInfo info, StyledLayerDescriptor style, boolean format) throws IOException { synchronized (sldCache) { Resource styleFile = dataDir().style(info); BufferedOutputStream out = new BufferedOutputStream(styleFile.out()); try { Styles.handler(info.getFormat()) .encode(style, info.getFormatVersion(), format, out); clear(info); } finally { out.close(); } } }
/** * Serializes a style to configuration optionally formatting the style when writing it. * * @param info The configuration for the style. * @param style The style object. * @param format Whether to format the style */ public void writeStyle(StyleInfo info, Style style, boolean format) throws IOException { synchronized (styleCache) { Resource styleFile = dataDir().style(info); BufferedOutputStream out = new BufferedOutputStream(styleFile.out()); try { Styles.handler(info.getFormat()) .encode(Styles.sld(style), info.getFormatVersion(), format, out); clear(info); } finally { out.close(); } } }
"Feature Type {0} cleared: Disposing DataStore {1} - {2}", new String[] {ft.getName(), ds.getName(), "Last Feature Type Disposed"}); clear(ds); } else { if (dataStore instanceof ContentDataStore) {
assertNotNull(dataStore); assertFalse(disposeCalled); pool.clear(info); assertTrue(disposeCalled);
void clear(CoverageStoreInfo info) { catalog.getResourcePool().clear(info); }
void clear(DataStoreInfo info) { catalog.getResourcePool().clear(info); }
void clear(CoverageStoreInfo info) { catalog.getResourcePool().clear(info); }
void clear(WMSStoreInfo info) { catalog.getResourcePool().clear(info); }
void clear(DataStoreInfo info) { catalog.getResourcePool().clear(info); }
@Override protected void onClick(AjaxRequestTarget target, Form form) { GeoServerApplication app = (GeoServerApplication) getApplication(); FeatureTypeInfo ft = (FeatureTypeInfo) getResourceInfo(); app.getCatalog().getResourcePool().clear(ft); app.getCatalog().getResourcePool().clear(ft.getStore()); target.add(attributePanel); } };
@Override protected void onClick(AjaxRequestTarget target, Form form) { GeoServerApplication app = (GeoServerApplication) getApplication(); FeatureTypeInfo ft = (FeatureTypeInfo)getResourceInfo(); app.getCatalog().getResourcePool().clear(ft); app.getCatalog().getResourcePool().clear(ft.getStore()); target.addComponent(attributePanel); } };