public boolean expire(TileRange trObj) throws StorageException { long layerId = idCache.getLayerId(trObj.getLayerName()); long formatId = idCache.getFormatId(trObj.getMimeType().getFormat()); long parametersId = idCache.getParametersId(trObj.getParameters()); if (-1L != parametersId) { trObj.setParametersId(parametersId); } long gridSetIdId = idCache.getGridSetsId(trObj.getGridSetId()); for (int zoomLevel = trObj.getZoomStart(); zoomLevel <= trObj.getZoomStop(); zoomLevel++) { try { wrpr.expireRange(trObj, zoomLevel, layerId, formatId, parametersId, gridSetIdId); } catch (SQLException se) { log.error(se.getMessage()); } } return true; }
public boolean delete(BlobStore blobStore, TileRange trObj) throws StorageException { long layerId = idCache.getLayerId(trObj.getLayerName()); long formatId = idCache.getFormatId(trObj.getMimeType().getFormat()); // FRD Set the parameters ID long parametersId = -1; if (trObj.getParametersId() != null) { parametersId = trObj.getParametersId(); } else if (trObj.getParameters() != null) { parametersId = idCache.getParametersId(trObj.getParameters()); if (-1L != parametersId) { trObj.setParametersId(parametersId); } } long gridSetIdId = idCache.getGridSetsId(trObj.getGridSetId()); for (int zoomLevel = trObj.getZoomStart(); zoomLevel <= trObj.getZoomStop(); zoomLevel++) { wrpr.deleteRange(blobStore, trObj, zoomLevel, layerId, formatId, parametersId, gridSetIdId); } return true; }