public void onApplicationEvent(ApplicationEvent event) { if (event instanceof ContextRefreshedEvent) { extensionsCache.clear(); singletonBeanCache.clear(); } }
/** * Sets the web application context to be used for looking up extensions. * * <p>This method is called by the spring container, and should never be called by client code. * If client needs to supply a particular context, methods which take a context are available. * * <p>This is the context that is used for methods which don't supply their own context. * * @param context ApplicationContext used to lookup extensions */ public void setApplicationContext(ApplicationContext context) throws BeansException { isSpringContext = true; GeoServerExtensions.context = context; extensionsCache.clear(); singletonBeanCache.clear(); propertyCache.clear(); }
@Override public void clear() { for (Entry entry : entrySet()) { try { dispose((K) entry.getKey(), (V) entry.getValue()); } catch (Exception e) { LOGGER.log(Level.WARNING, "Error dispoing entry: " + entry, e); } } super.clear(); }
/** Clear caches used by GeoServerExtensions. */ public static void clear() { GeoServerExtensions.extensionsCache.clear(); GeoServerExtensions.singletonBeanCache.clear(); GeoServerExtensions.propertyCache.clear(); GeoServerExtensions.fileCache.clear(); } /**
public void clearCache() { CACHE.clear(); }
@Override public int removeGranules(Query query) { final int val = adaptee.removeGranules(query); // clear cache if needed // TODO this can be optimized further filtering out elements using the Query's Filter if (val >= 1) { descriptorsCache.clear(); } return val; }
@Override public void dispose() { synchronized (coverageSourceDescriptorsCache) { coverageSourceDescriptorsCache.clear(); } super.dispose(); checkType = CheckType.UNSET; georeferencing.dispose(); numImages = -1; try { if (dataset != null) { dataset.close(); } if (ancillaryFileManager != null) { ancillaryFileManager.dispose(); } if (imageInputStream != null) { IOUtils.closeQuietly(imageInputStream); } } catch (IOException e) { if (LOGGER.isLoggable(Level.WARNING)) LOGGER.warning("Errors closing NetCDF dataset." + e.getLocalizedMessage()); } finally { dataset = null; ancillaryFileManager = null; imageInputStream = null; } }
@Override public void dispose() { super.dispose(); synchronized (this) { if (coverages != null && !coverages.isEmpty()) { Iterator<String> keysIt = coverages.keySet().iterator(); while (keysIt.hasNext()) { String key = keysIt.next(); CoverageSource sourceCov = coverages.get(key); sourceCov.dispose(); } coverages.clear(); } coverages = null; } if (access != null) { try { access.dispose(); } catch (Throwable t) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, t.getLocalizedMessage(), t); } } } }
public void dataStoreChange(TransactionEvent event) throws WFSException { // if anything changes we just wipe out the cache. the mapkey // contains a string with part of the map request where the layer // name is included, but we would have to parse it and consider // also that the namespace may be missing in the getmap request tileCache.clear(); } }
/** * Removes all of the elements from this collection. */ public void clear() { SoftValueHashMap.this.clear(); }
void clearFeatureSourceCaches() { featureSourceCache.clear(); } }
public void onApplicationEvent(ApplicationEvent event) { if(event instanceof ContextRefreshedEvent) extensionsCache.clear(); }
/** * Sets the web application context to be used for looking up extensions. * <p> * This method is called by the spring container, and should never be called * by client code. If client needs to supply a particular context, methods * which take a context are available. * </p> * <p> * This is the context that is used for methods which dont supply their * own context. * </p> */ public void setApplicationContext(ApplicationContext context) throws BeansException { GeoServerExtensions.context = context; extensionsCache.clear(); }
public void changed() { tileCache.clear(); }
@Override public void dispose() { synchronized (coverageSourceDescriptorsCache) { coverageSourceDescriptorsCache.clear(); } super.dispose(); checkType = CheckType.UNSET; coordinatesVariables.clear(); numImages = -1; try { if (dataset != null) { dataset.close(); } if (ancillaryFileManager != null) { ancillaryFileManager.dispose(); } } catch (IOException e) { if (LOGGER.isLoggable(Level.WARNING)) LOGGER.warning("Errors closing NetCDF dataset." + e.getLocalizedMessage()); } finally { dataset = null; ancillaryFileManager = null; } }
@Override public void dispose() { synchronized (coverageSourceDescriptorsCache) { coverageSourceDescriptorsCache.clear(); } super.dispose(); checkType = CheckType.UNSET; georeferencing.dispose(); numImages = -1; try { if (dataset != null) { dataset.close(); } if (ancillaryFileManager != null) { ancillaryFileManager.dispose(); } if (imageInputStream != null) { IOUtils.closeQuietly(imageInputStream); } } catch (IOException e) { if (LOGGER.isLoggable(Level.WARNING)) LOGGER.warning("Errors closing NetCDF dataset." + e.getLocalizedMessage()); } finally { dataset = null; ancillaryFileManager = null; imageInputStream = null; } }
@Override public void dispose() { super.dispose(); synchronized (this) { if (coverages != null && !coverages.isEmpty()) { Iterator<String> keysIt = coverages.keySet().iterator(); while (keysIt.hasNext()) { String key = keysIt.next(); CoverageSource sourceCov = coverages.get(key); sourceCov.dispose(); } coverages.clear(); } coverages = null; } if (access != null) { try { access.dispose(); } catch (Throwable t) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, t.getLocalizedMessage(), t); } } } }