/** {@inheritDoc} */ @Override public void clear() { ff4jStore().clear(); }
public void deleteAllProperties() { ff4j.getPropertiesStore().clear(); }
@POST @Path("/" + STORE_CLEAR) @ApiOperation(value= "Delete all <b>Properties</b> in store") @ApiResponses(@ApiResponse(code = 200, message= "status of current ff4j bean", response=PropertyStoreApiBean.class)) @Produces(MediaType.APPLICATION_JSON) public PropertyStoreApiBean clearProperties() { getPropertyStore().clear(); return new PropertyStoreApiBean(ff4j.getPropertiesStore()); }
/** {@inheritDoc} */ public void clear() { long start = System.nanoTime(); target.clear(); long duration = System.nanoTime() - start; publish(builder(ACTION_CLEAR).type(TARGET_PSTORE) .name(ff4j.getPropertiesStore().getClass().getName()) .duration(duration)); }
/** TDD. */ @Test public void clear() { // Given Assert.assertNotNull(testedStore); Map <String, Property<?>> before = testedStore.readAllProperties(); Assert.assertFalse(before.isEmpty()); // When testedStore.clear(); // Then Assert.assertTrue(testedStore.readAllProperties().isEmpty()); /// Reinit for (Map.Entry<String,Property<?>> pName : before.entrySet()) { testedStore.createProperty(pName.getValue()); } }
/** {@inheritDoc} */ @Override public void clear() { // Cache Operations : As modification, flush cache for this getCacheManager().clearProperties(); getTargetPropertyStore().clear(); // Cache Operations : As modification, flush cache for this getCacheManager().clearFeatures(); getTargetFeatureStore().clear(); }