/* * (non-Javadoc) * * @see ca.unb.cs.pcsf.db.DBAccessService#deleteCollaboration(ca.unb.cs.pcsf.db.Collaboration) */ public void deleteCollaboration(Collaboration collaboration) { logger.debug(LOGPRE + "deleteCollaboration() start" + LOGPRE); if (isCollaborationExist(collaboration.getName())) { logger.info("Deleting participants..."); List<Participant> participants = collaboration.getParticipants(); for (Participant p : participants) { sdb.deleteAttributes(new DeleteAttributesRequest(DOMAIN_PARTICIPANT, p.getId())); } sdb.deleteAttributes( new DeleteAttributesRequest(DOMAIN_COLLABORATION, collaboration.getId())); logger.info("Delete Done!"); logger.debug(LOGPRE + "deleteCollaboration() end" + LOGPRE); } }
private void deleteInvalid(String domain, String id) { log.debug("Deleting invalid <" + domain + ", " + id + ">"); DeleteAttributesRequest deleteRequest = new DeleteAttributesRequest(domain, id); try { sdb.deleteAttributes(deleteRequest); } catch (Exception e) { AdWhirlUtil.logException(e, log); return; } }
/** * Issue a probe request to remoteip:remoteport. If the server does not respond, remove it from * SimpleDB. * * @return */ private boolean probe(Server s) { if (RPCClient.probe(s)) { System.out.println(s + " Active"); return true; } else { System.out.println(s + " Inactive"); sdb.deleteAttributes(new DeleteAttributesRequest(simpleDBDomain, s.toString())); System.out.println(s + " Removed"); return false; } }