public synchronized void
addNegative(Name name, int type, SOARecord soa, int cred) {
	long ttl = 0;
	if (soa != null)
		ttl = soa.getTTL();
	Element element = findElement(name, type, 0);
	if (ttl == 0) {
		if (element != null && element.compareCredibility(cred) <= 0)
			removeElement(name, type);
	} else {
		if (element != null && element.compareCredibility(cred) <= 0)
			element = null;
		if (element == null)
			addElement(name, new NegativeElement(name, type,
							     soa, cred,
							     maxncache));
	}
}
Adds a negative entry to the Cache.
@param name The name of the negative entry
@param type The type of the negative entry
@param soa The SOA record to add to the negative cache entry, or null.
The negative cache ttl is derived from the SOA.
@param cred The credibility of the negative entry
src/main/java/core/org/xbill/DNS/Cache.java