Exemplo n.º 1
0
 private static final Record getEmptyRecord(
     Name name, int type, int dclass, long ttl, boolean hasData) {
   Record rec;
   if (hasData) rec = getTypedObject(type).getObject();
   else rec = new EmptyRecord();
   rec.name = name;
   rec.type = type;
   rec.dclass = dclass;
   rec.ttl = ttl;
   return rec;
 }
Exemplo n.º 2
0
 /**
  * Creates a new record identical to the current record, but with a different class and ttl. This
  * is most useful for dynamic update.
  */
 Record withDClass(int dclass, long ttl) {
   Record rec = cloneRecord();
   rec.dclass = dclass;
   rec.ttl = ttl;
   return rec;
 }