@Override public boolean executeOperation(BlobStore store, Object... objs) throws StorageException { if (objs == null || objs.length < 2 || !(objs[0] instanceof String) || !(objs[1] instanceof String)) { return false; } return store.deleteByParametersId((String) objs[0], (String) objs[1]); } },
public boolean deleteByParametersId(final String layerName, String parametersId) throws StorageException { return blobStore.deleteByParametersId(layerName, parametersId); }
/** * Delete the cache for the named layer and parameters. * * @param layerName * @param parameters Complete filtered parameters to generate the ID * @return {@literal true} if successful, {@literal false} otherwise * @throws StorageException */ public default boolean deleteByParameters( final String layerName, final Map<String, String> parameters) throws StorageException { return deleteByParametersId(layerName, ParametersUtils.getId(parameters)); }
@Override public boolean deleteByParametersId(String layerName, String parametersId) throws StorageException { return readFunctionUnsafe( () -> store(layerName).deleteByParametersId(layerName, parametersId)); }
id -> { try { return this.deleteByParametersId(layer.getName(), id); } catch (StorageException e) { throw new UncheckedIOException(e);
store.deleteByParametersId("testLayer", paramID1); assertThat(store.get(fromCache2_3), is(true)); assertThat(fromCache2_3, hasProperty("blobSize", is((int) size2)));
store.deleteByParametersId("testLayer", paramID1); EasyMock.verify(listener); assertThat(store.get(fromCache1_2), is(false));