public class AddressUtil extends Object
Constructor and Description |
---|
AddressUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
getAddressCacheNegativeTtl(UnknownHostException originalException)
Fetch the security value that determines how long DNS failures are cached.
|
static HostAndPort |
parseAddress(String address,
boolean ignoreMissingPort) |
static HostAndPort |
parseAddress(String address,
int defaultPort) |
public static HostAndPort parseAddress(String address, boolean ignoreMissingPort) throws NumberFormatException
NumberFormatException
public static HostAndPort parseAddress(String address, int defaultPort)
public static int getAddressCacheNegativeTtl(UnknownHostException originalException)
originalException
- the host lookup that is the source of needing this lookup. maybe be null.IllegalArgumentException
- if dns failures are cached foreverInetAddress
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.