@Override public boolean deleteByGridsetId(final String layerName, final String gridSetId) throws StorageException { checkNotNull(layerName, "layerName"); checkNotNull(gridSetId, "gridSetId"); final String gridsetPrefix = keyBuilder.forGridset(layerName, gridSetId); boolean prefixExists; try { prefixExists = s3Ops.scheduleAsyncDelete(gridsetPrefix); } catch (GeoWebCacheException e) { throw Throwables.propagate(e); } if (prefixExists) { listeners.sendGridSubsetDeleted(layerName, gridSetId); } return prefixExists; }
@Override public boolean deleteByGridsetId(final String layerName, final String gridSetId) throws StorageException { checkNotNull(layerName, "layerName"); checkNotNull(gridSetId, "gridSetId"); final String gridsetPrefix = keyBuilder.forGridset(layerName, gridSetId); boolean prefixExists; try { prefixExists = s3Ops.scheduleAsyncDelete(gridsetPrefix); } catch (GeoWebCacheException e) { throw Throwables.propagate(e); } if (prefixExists) { listeners.sendGridSubsetDeleted(layerName, gridSetId); } return prefixExists; }
@Override public boolean deleteByGridsetId(String layerName, String gridSetId) throws StorageException { boolean deleted = deleteFiles(fileManager.getFiles(layerName, gridSetId)); listeners.sendGridSubsetDeleted(layerName, gridSetId); return deleted; }
@Override public boolean deleteByGridsetId(String layerName, String gridSetId) throws StorageException { boolean deleted = deleteFiles(fileManager.getFiles(layerName, gridSetId)); listeners.sendGridSubsetDeleted(layerName, gridSetId); return deleted; }
/** * @throws StorageException * @see org.geowebcache.storage.BlobStore#deleteByGridsetId(java.lang.String, java.lang.String) */ public boolean deleteByGridsetId(final String layerName, final String gridSetId) throws StorageException { final File layerPath = getLayerPath(layerName); if (!layerPath.exists() || !layerPath.canWrite()) { log.info(layerPath + " does not exist or is not writable"); return false; } final String filteredGridSetId = filteredGridSetId(gridSetId); File[] gridSubsetCaches = layerPath.listFiles( new FileFilter() { public boolean accept(File pathname) { if (!pathname.isDirectory()) { return false; } String dirName = pathname.getName(); return dirName.startsWith(filteredGridSetId); } }); for (File gridSubsetCache : gridSubsetCaches) { String target = filteredLayerName(layerName) + "_" + gridSubsetCache.getName(); stageDelete(gridSubsetCache, target); } listeners.sendGridSubsetDeleted(layerName, gridSetId); return true; }