예제 #1
0
파일: Zone.java 프로젝트: lemmy/dnsjava
 /**
  * Removes a record from the Zone
  *
  * @param r The record to be removed
  * @see Record
  */
 public void removeRecord(Record r) {
   Name name = r.getName();
   short type = r.getRRsetType();
   RRset rrset = (RRset) findExactSet(name, type);
   if (rrset != null) {
     rrset.deleteRR(r);
     if (rrset.size() == 0) removeSet(name, type, rrset);
   }
 }
예제 #2
0
 /**
  * Removes a record from the Zone
  *
  * @param r The record to be removed
  * @see Record
  */
 public void removeRecord(Record r) {
   Name name = r.getName();
   int rtype = r.getRRsetType();
   synchronized (this) {
     RRset rrset = findRRset(name, rtype);
     if (rrset == null) return;
     rrset.deleteRR(r);
     if (rrset.size() == 0) removeRRset(name, rtype);
   }
 }