public interface CustomResolver
extends org.xbill.DNS.Resolver
We achieve this by entering a redundant mode whenever we detect an abnormal delay (longer than DNS_PATIENCE) while waiting for a DNS resonse, or when that response is not considered satisfying.
Once we enter redundant mode, we start duplicating all queries and sending them to both our primary and backup resolvers (in case we have any). We then always return the first response we get, regardless of who sent it.
We exit redundant mode after receiving DNS_REDEMPTION consecutive timely and correct responses from our primary resolver.
Modifier and Type | Field and Description |
---|---|
static int |
currentDnsRedemption
The currently configured number of times that the primary DNS would have
to provide a faster response than the backup resolver before we consider
it safe enough to exit redundant mode.
|
static int |
DNS_PATIENCE
The default number of milliseconds it takes us to get into redundant
mode while waiting for a DNS query response.
|
static int |
DNS_REDEMPTION
The default number of times that the primary DNS would have to provide a
faster response than the backup resolver before we consider it safe
enough to exit redundant mode.
|
static boolean |
PDEFAULT_DNSSEC_RESOLVER_ENABLED
Default value of @see PNAME_DNSSEC_RESOLVER_ENABLED.
|
static java.lang.String |
PNAME_DNS_PATIENCE
The name of the property that allows us to override the default
DNS_PATIENCE value.
|
static java.lang.String |
PNAME_DNS_REDEMPTION
The name of the property that allows us to override the default
DNS_REDEMPTION value.
|
static java.lang.String |
PNAME_DNSSEC_RESOLVER_ENABLED
The name of the property that enables or disables the DNSSEC resolver
(instead of a normal, non-validating local resolver).
|
Modifier and Type | Method and Description |
---|---|
void |
reset()
Resets resolver configuration and populate our default resolver
with the newly configured servers.
|
static final int DNS_PATIENCE
static final java.lang.String PNAME_DNS_PATIENCE
static final int DNS_REDEMPTION
static final java.lang.String PNAME_DNS_REDEMPTION
static final int currentDnsRedemption
static final java.lang.String PNAME_DNSSEC_RESOLVER_ENABLED
static final boolean PDEFAULT_DNSSEC_RESOLVER_ENABLED
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.