public void deletePodLogState(String podName) throws IOException { jsonDB.delete("/logs/pods/" + podName); }
@Path("/{path: .*}.json") @Consumes(APPLICATION_JSON) @DELETE public Response delete(@PathParam("path") String path) { Response.Status status; if( jsondb.delete(path) ) { status = Response.Status.NO_CONTENT; } else { status = Response.Status.NOT_FOUND; } return Response.status(status).build(); } }
@Path("/{path: .*}.json") @Consumes(APPLICATION_JSON) @DELETE public Response delete(@PathParam("path") String path) { Response.Status status; if( jsondb.delete(path) ) { status = Response.Status.NO_CONTENT; } else { status = Response.Status.NOT_FOUND; } return Response.status(status).build(); } }
@Override public boolean delete(String id) { try { if( id == null ) { throw new IllegalArgumentException("id not set"); } String dbPath = getCollectionPath()+"/:"+id; return jsondb.delete(dbPath); } catch (@SuppressWarnings("PMD.AvoidCatchingGenericException") RuntimeException e) { throw SyndesisServerException.launderThrowable(e); } }
@Override public boolean delete(String id) { try { if( id == null ) { throw new IllegalArgumentException("id not set"); } String dbPath = getCollectionPath()+"/:"+id; return jsondb.delete(dbPath); } catch (@SuppressWarnings("PMD.AvoidCatchingGenericException") RuntimeException e) { throw SyndesisServerException.launderThrowable(e); } }
pods.keySet().removeAll(podHandlers.keySet()); for (String o : pods.keySet()) { jsonDB.delete("/logs/pods/" + o); LOG.info("Pod state removed from db: {}", o);
/** * If Integrations get deleted we should also delete their metrics * * @param activeIntegrationIds * @throws IOException * @throws JsonMappingException */ @Override public void curate(Set<String> activeIntegrationIds) throws IOException, JsonMappingException { //1. Loop over all RawMetrics String json = jsonDB.getAsString(path(), new GetOptions().depth(1)); if (json != null) { Map<String,Boolean> metricsMap = Json.reader().forType(TYPE_REFERENCE).readValue(json); Set<String> rawIntegrationIds = metricsMap.keySet(); for (String rawIntId : rawIntegrationIds) { if (! activeIntegrationIds.contains(rawIntId)) { jsonDB.delete(path(rawIntId)); } } } }
jsonDB.delete(path(integrationId,entry.getKey()));