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; }
/** * 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; }