public interface DnsServerResponseFeedbackAddressStream extends DnsServerAddressStream
限定符和类型 | 方法和说明 |
---|---|
void |
feedbackFailure(java.net.InetSocketAddress address,
java.lang.Throwable failureCause,
long queryResponseTimeNanos)
A way to provide failure feedback to
DnsServerAddressStream so that DnsServerAddressStream.next() cab be tuned
to return the best performing DNS server address |
void |
feedbackSuccess(java.net.InetSocketAddress address,
long queryResponseTimeNanos)
A way to provide success feedback to
DnsServerAddressStream so that DnsServerAddressStream.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 |
duplicate, next, size
void feedbackSuccess(java.net.InetSocketAddress address, long queryResponseTimeNanos)
DnsServerAddressStream
so that DnsServerAddressStream.next()
can be tuned
to return the best performing DNS server address
NOTE: This is called regardless of the RCode returned by the DNS serveraddress
- The address returned by DnsServerAddressStream.next()
that feedback needs to be applied toqueryResponseTimeNanos
- The response time of a query against the given DNS servervoid feedbackFailure(java.net.InetSocketAddress address, java.lang.Throwable failureCause, long queryResponseTimeNanos)
DnsServerAddressStream
so that DnsServerAddressStream.next()
cab be tuned
to return the best performing DNS server addressaddress
- The address returned by DnsServerAddressStream.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