@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.deleteByGridsetId((String) objs[0], (String) objs[1]); } },
public boolean deleteByGridSetId(final String layerName, final String gridSetId) throws StorageException { return blobStore.deleteByGridsetId(layerName, gridSetId); }
@Override public boolean deleteByGridsetId(String layerName, String gridSetId) throws StorageException { // Check if the blobstore has already been configured if (configured.get()) { // Increment the number of current operations // This behavior is used in order to wait // the end of all the operations after setting // the configured parameter to false actualOperations.incrementAndGet(); try { // Delete the TileObjects related to the selected gridset return delegate.deleteByGridsetId(layerName, gridSetId); } finally { // Decrement the number of current operations. actualOperations.decrementAndGet(); } } return true; }
@Override public boolean deleteByGridsetId(String layerName, String gridSetId) throws StorageException { return readFunctionUnsafe(() -> store(layerName).deleteByGridsetId(layerName, gridSetId)); }
assertThat(store.deleteByGridsetId("testLayer", "testGridSet1"), is(true)); EasyMock.verify(listener); assertThat(store.get(fromCache1_2), is(false));
new ByteArrayResource( "7,8,9,10 test".getBytes(StandardCharsets.UTF_8))))); store.deleteByGridsetId("testLayer", "testGridSet1"); assertThat(store.get(fromCache1_2), is(false)); assertThat(fromCache1_2, hasProperty("blobSize", is(0)));