@Override void cache(String hostname, DnsRecord[] additionals, DnsRecord result, InetAddress convertedResult) { resolveCache.cache(hostname, additionals, convertedResult, result.timeToLive(), parent.ch.eventLoop()); }
private void encodeRecord0(DnsRecord record, ByteBuf out) throws Exception { encodeName(record.name(), out); out.writeShort(record.type().intValue()); out.writeShort(record.dnsClass()); out.writeInt((int) record.timeToLive()); }
@Override void cache(String hostname, DnsRecord[] additionals, DnsRecord result, InetAddress convertedResult) { resolveCache.cache(hostname, additionals, convertedResult, result.timeToLive(), parent.ch.eventLoop()); }
private void encodeRecord0(DnsRecord record, ByteBuf out) throws Exception { encodeName(record.name(), out); out.writeShort(record.type().intValue()); out.writeShort(record.dnsClass()); out.writeInt((int) record.timeToLive()); }
head = new AuthoritativeNameServer(dots, r.timeToLive(), recordName, domainName); } else if (head.dots == dots) { AuthoritativeNameServer serverName = head; serverName = serverName.next; serverName.next = new AuthoritativeNameServer(dots, r.timeToLive(), recordName, domainName); nameServerCount++;
String mappingWithDot = hostnameWithDot(mapping); if (!nameWithDot.equalsIgnoreCase(mappingWithDot)) { cache.cache(nameWithDot, mappingWithDot, r.timeToLive(), loop); cnames.put(name, mapping);
.dnsTTL(dnsRecord.timeToLive());
head = new AuthoritativeNameServer(dots, r.timeToLive(), recordName, domainName); } else if (head.dots == dots) { AuthoritativeNameServer serverName = head; serverName = serverName.next; serverName.next = new AuthoritativeNameServer(dots, r.timeToLive(), recordName, domainName); nameServerCount++;
serverName.update(parent.newRedirectServerAddress(resolved), r.timeToLive());
serverName.update(parent.newRedirectServerAddress(resolved), r.timeToLive());
@Override void cache(String hostname, DnsRecord[] additionals, DnsRecord result, InetAddress convertedResult) { resolveCache.cache(hostname, additionals, convertedResult, result.timeToLive(), parent.ch.eventLoop()); }
@Override void cache(String hostname, DnsRecord[] additionals, DnsRecord result, InetAddress convertedResult) { resolveCache.cache(hostname, additionals, convertedResult, result.timeToLive(), parent.ch.eventLoop()); }
private void encodeRecord0(DnsRecord record, ByteBuf out) throws Exception { encodeName(record.name(), out); out.writeShort(record.type().intValue()); out.writeShort(record.dnsClass()); out.writeInt((int) record.timeToLive()); }
private void encodeRecord0(DnsRecord record, ByteBuf out) throws Exception { encodeName(record.name(), out); out.writeShort(record.type().intValue()); out.writeShort(record.dnsClass()); out.writeInt((int) record.timeToLive()); }
private void encodeRecord0(DnsRecord record, ByteBuf out) throws Exception { encodeName(record.name(), out); out.writeShort(record.type().intValue()); out.writeShort(record.dnsClass()); out.writeInt((int) record.timeToLive()); }
DnsCacheEntry(AddressedEnvelope<DnsResponse, InetSocketAddress> enveloppe) { answserRr = enveloppe.content().recordAt((DnsSection.ANSWER)); questionRr = (DnsQuestion) enveloppe.content().recordAt((DnsSection.QUESTION)); code = enveloppe.content().code(); // Default to 5s on failure, just to avoid wild loop // Also check than the answerRR is not null, some servers are happy to return ok on failure int ttl = (code.intValue() == NOERROR && answserRr != null) ? (int) answserRr.timeToLive() : 5; eol = Instant.now().plus(ttl, ChronoUnit.SECONDS); assert ! (answserRr instanceof ReferenceCounted); assert ! (questionRr instanceof ReferenceCounted); assert ! (code instanceof ReferenceCounted); }
.dnsTTL(dnsRecord.timeToLive());
String mappingWithDot = hostnameWithDot(mapping); if (!nameWithDot.equalsIgnoreCase(mappingWithDot)) { cache.cache(nameWithDot, mappingWithDot, r.timeToLive(), loop); cnames.put(name, mapping);
serverName.update(parent.newRedirectServerAddress(resolved), r.timeToLive());
addNameServerToCache(authoritativeNameServer, resolved, r.timeToLive());