DnsOptions.StaleDnsOptions
Stay organized with collections
Save and categorize content based on your preferences.
A class configuring Cronet's stale DNS functionality.
DNS resolution is one of the steps on the critical path to making a URL request, but it
can be slow for various reasons (underlying network latency, buffer bloat, packet loss,
etc.).
Depending on the use case, it might be worthwhile for an app developer to trade off
guaranteed DNS record freshness for better availability of DNS records.
Stale results can include both:
- results returned from the current network's DNS server, but past their time-to-live,
and
- results returned from a previous network's DNS server, whether expired or not.
Inherited Method Summary
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
Public Methods
public
Boolean
getAllowCrossNetworkUsage
()
public
Long
getFreshLookupTimeoutMillis
()
public
Long
getMaxExpiredDelayMillis
()
public
Boolean
getUseStaleOnNameNotResolved
()
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-10-26 UTC.
[null,null,["Last updated 2023-10-26 UTC."],[],[],null,["# DnsOptions.StaleDnsOptions\n\npublic static class **DnsOptions.StaleDnsOptions** extends Object \nA class configuring Cronet's stale DNS functionality.\n\nDNS resolution is one of the steps on the critical path to making a URL request, but it\ncan be slow for various reasons (underlying network latency, buffer bloat, packet loss,\netc.).\n\nDepending on the use case, it might be worthwhile for an app developer to trade off\nguaranteed DNS record freshness for better availability of DNS records.\n\nStale results can include both:\n\n- results returned from the current network's DNS server, but past their time-to-live, and\n- results returned from a previous network's DNS server, whether expired or not.\n\n\u003cbr /\u003e\n\n### Nested Class Summary\n\n|-------|---|---|-------------------------------------------------------------------------------------------------------------------|\n| class | [DnsOptions.StaleDnsOptions.Builder](../../../../reference/org/chromium/net/DnsOptions.StaleDnsOptions.Builder.html) || Builder for [DnsOptions.StaleDnsOptions](../../../../reference/org/chromium/net/DnsOptions.StaleDnsOptions.html). |\n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| static [DnsOptions.StaleDnsOptions.Builder](../../../../reference/org/chromium/net/DnsOptions.StaleDnsOptions.Builder.html) | [builder](../../../../reference/org/chromium/net/DnsOptions.StaleDnsOptions.html#builder())() |\n| Boolean | [getAllowCrossNetworkUsage](../../../../reference/org/chromium/net/DnsOptions.StaleDnsOptions.html#getAllowCrossNetworkUsage())() |\n| Long | [getFreshLookupTimeoutMillis](../../../../reference/org/chromium/net/DnsOptions.StaleDnsOptions.html#getFreshLookupTimeoutMillis())() |\n| Long | [getMaxExpiredDelayMillis](../../../../reference/org/chromium/net/DnsOptions.StaleDnsOptions.html#getMaxExpiredDelayMillis())() |\n| Boolean | [getUseStaleOnNameNotResolved](../../../../reference/org/chromium/net/DnsOptions.StaleDnsOptions.html#getUseStaleOnNameNotResolved())() |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|------------------|---------------------------|\n| Object | clone() |\n| boolean | equals(Object arg0) |\n| void | finalize() |\n| final Class\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| String | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public static [DnsOptions.StaleDnsOptions.Builder](../../../../reference/org/chromium/net/DnsOptions.StaleDnsOptions.Builder.html)\n**builder**\n()\n\n\u003cbr /\u003e\n\n#### public Boolean\n**getAllowCrossNetworkUsage**\n()\n\n\u003cbr /\u003e\n\n#### public Long\n**getFreshLookupTimeoutMillis**\n()\n\n\u003cbr /\u003e\n\n#### public Long\n**getMaxExpiredDelayMillis**\n()\n\n\u003cbr /\u003e\n\n#### public Boolean\n**getUseStaleOnNameNotResolved**\n()\n\n\u003cbr /\u003e"]]