home *** CD-ROM | disk | FTP | other *** search
- package org.xbill.DNS;
-
- class Cache$NegativeElement extends Cache.Element {
- int type;
- Name name;
- SOARecord soa;
-
- public Cache$NegativeElement(Name name, int type, SOARecord soa, int cred, long maxttl) {
- this.name = name;
- this.type = type;
- this.soa = soa;
- long cttl = 0L;
- if (soa != null) {
- cttl = soa.getMinimum();
- if (maxttl >= 0L) {
- cttl = Math.min(cttl, maxttl);
- }
- }
-
- this.setValues(cred, cttl);
- }
-
- public int getType() {
- return this.type;
- }
-
- public String toString() {
- StringBuffer sb = new StringBuffer();
- if (this.type == 0) {
- sb.append("NXDOMAIN " + this.name);
- } else {
- sb.append("NXRRSET " + this.name + " " + Type.string(this.type));
- }
-
- sb.append(" cl = ");
- sb.append(this.credibility);
- return sb.toString();
- }
- }
-