Interface DnsServerResponseFeedbackAddressStream
- All Superinterfaces:
DnsServerAddressStream
An infinite stream of DNS server addresses, that requests feedback to be returned to it.
If query is successful timing information is provided, else a failure notification is given.
-
Method Summary
Modifier and TypeMethodDescriptionvoidfeedbackFailure(InetSocketAddress address, Throwable failureCause, long queryResponseTimeNanos) A way to provide failure feedback toDnsServerAddressStreamso thatDnsServerAddressStream.next()cab be tuned to return the best performing DNS server addressvoidfeedbackSuccess(InetSocketAddress address, long queryResponseTimeNanos) A way to provide success feedback toDnsServerAddressStreamso thatDnsServerAddressStream.next()can be tuned to return the best performing DNS server address NOTE: This is called regardless of the RCode returned by the DNS serverMethods inherited from interface DnsServerAddressStream
duplicate, next, sizeModifier and TypeMethodDescriptionDuplicate this object.next()Retrieves the next DNS server address from the stream.intsize()Get the number of timesDnsServerAddressStream.next()will return a distinct element before repeating or terminating.
-
Method Details
-
feedbackSuccess
A way to provide success feedback toDnsServerAddressStreamso thatDnsServerAddressStream.next()can be tuned to return the best performing DNS server address NOTE: This is called regardless of the RCode returned by the DNS server- Parameters:
address- The address returned byDnsServerAddressStream.next()that feedback needs to be applied toqueryResponseTimeNanos- The response time of a query against the given DNS server
-
feedbackFailure
void feedbackFailure(InetSocketAddress address, Throwable failureCause, long queryResponseTimeNanos) A way to provide failure feedback toDnsServerAddressStreamso thatDnsServerAddressStream.next()cab be tuned to return the best performing DNS server address- Parameters:
address- The address returned byDnsServerAddressStream.next()that feedback needs to be applied tofailureCause- The reason the DNS query failed, can be used to penalize failures differentlyqueryResponseTimeNanos- The response time of a query against the given DNS server
-