public class NettyDnsResolver extends Object implements DnsResolver
Modifier and Type | Field and Description |
---|---|
static String |
CIRCUIT_BREAKER_STATE_CHANGE_EVENT_UEI |
Constructor and Description |
---|
NettyDnsResolver(EventForwarder eventForwarder,
com.codahale.metrics.MetricRegistry metrics) |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
boolean |
getBreakerEnabled() |
int |
getBreakerFailureRateThreshold() |
int |
getBreakerRingBufferSizeInClosedState() |
int |
getBreakerRingBufferSizeInHalfOpenState() |
int |
getBreakerWaitDurationInOpenState() |
int |
getBulkheadMaxConcurrentCalls() |
long |
getBulkheadMaxWaitDurationMillis() |
io.github.resilience4j.circuitbreaker.CircuitBreaker |
getCircuitBreaker() |
long |
getMaxCacheSize() |
int |
getMaxTtlSeconds() |
int |
getMinTtlSeconds() |
io.netty.resolver.dns.DnsServerAddressStreamProvider |
getNameServerProvider() |
String |
getNameservers() |
int |
getNegativeTtlSeconds() |
int |
getNumContexts() |
long |
getQueryTimeoutMillis() |
void |
init() |
CompletableFuture<Optional<InetAddress>> |
lookup(String hostname)
Perform a DNS lookup for the given hostname.
|
CompletableFuture<Optional<String>> |
reverseLookup(InetAddress inetAddress)
Perform a reverse DNS lookup for the given IP address.
|
void |
setBreakerEnabled(boolean breakerEnabled) |
void |
setBreakerFailureRateThreshold(int breakerFailureRateThreshold) |
void |
setBreakerRingBufferSizeInClosedState(int breakerRingBufferSizeInClosedState) |
void |
setBreakerRingBufferSizeInHalfOpenState(int breakerRingBufferSizeInHalfOpenState) |
void |
setBreakerWaitDurationInOpenState(int breakerWaitDurationInOpenState) |
void |
setBulkheadMaxConcurrentCalls(int bulkheadMaxConcurrentCalls) |
void |
setBulkheadMaxWaitDurationMillis(long bulkheadMaxWaitDurationMillis) |
void |
setMaxCacheSize(long maxCacheSize) |
void |
setMaxTtlSeconds(int maxTtlSeconds) |
void |
setMinTtlSeconds(int minTtlSeconds) |
void |
setNameservers(String nameservers) |
void |
setNegativeTtlSeconds(int negativeTtlSeconds) |
void |
setNumContexts(int numContexts) |
void |
setQueryTimeoutMillis(long queryTimeoutMillis) |
static List<InetSocketAddress> |
toSocketAddresses(String commaSeparatedAddressesWithPorts) |
public static final String CIRCUIT_BREAKER_STATE_CHANGE_EVENT_UEI
public NettyDnsResolver(EventForwarder eventForwarder, com.codahale.metrics.MetricRegistry metrics)
public void init()
public void destroy()
public CompletableFuture<Optional<InetAddress>> lookup(String hostname)
DnsResolver
lookup
in interface DnsResolver
hostname
- hostname to lookuppublic CompletableFuture<Optional<String>> reverseLookup(InetAddress inetAddress)
DnsResolver
reverseLookup
in interface DnsResolver
inetAddress
- IP address to lookuppublic boolean getBreakerEnabled()
public void setBreakerEnabled(boolean breakerEnabled)
public int getBreakerFailureRateThreshold()
public void setBreakerFailureRateThreshold(int breakerFailureRateThreshold)
public int getBreakerWaitDurationInOpenState()
public void setBreakerWaitDurationInOpenState(int breakerWaitDurationInOpenState)
public int getBreakerRingBufferSizeInHalfOpenState()
public void setBreakerRingBufferSizeInHalfOpenState(int breakerRingBufferSizeInHalfOpenState)
public int getBreakerRingBufferSizeInClosedState()
public void setBreakerRingBufferSizeInClosedState(int breakerRingBufferSizeInClosedState)
public int getBulkheadMaxConcurrentCalls()
public void setBulkheadMaxConcurrentCalls(int bulkheadMaxConcurrentCalls)
public long getBulkheadMaxWaitDurationMillis()
public void setBulkheadMaxWaitDurationMillis(long bulkheadMaxWaitDurationMillis)
public int getNumContexts()
public void setNumContexts(int numContexts)
public String getNameservers()
public void setNameservers(String nameservers)
public long getQueryTimeoutMillis()
public void setQueryTimeoutMillis(long queryTimeoutMillis)
public int getMinTtlSeconds()
public void setMinTtlSeconds(int minTtlSeconds)
public int getMaxTtlSeconds()
public void setMaxTtlSeconds(int maxTtlSeconds)
public int getNegativeTtlSeconds()
public void setNegativeTtlSeconds(int negativeTtlSeconds)
public long getMaxCacheSize()
public void setMaxCacheSize(long maxCacheSize)
public io.github.resilience4j.circuitbreaker.CircuitBreaker getCircuitBreaker()
public io.netty.resolver.dns.DnsServerAddressStreamProvider getNameServerProvider()
public static List<InetSocketAddress> toSocketAddresses(String commaSeparatedAddressesWithPorts)
Copyright © 2021. All rights reserved.