Package com.alibaba.dcm
Class DnsCacheEntry
- java.lang.Object
-
- com.alibaba.dcm.DnsCacheEntry
-
- All Implemented Interfaces:
Serializable
@Immutable @ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault public final class DnsCacheEntry extends Object implements Serializable
DNS cache entry(DNS record).- Author:
- Jerry Lee (oldratlee at gmail dot com)
- See Also:
DnsCache
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DnsCacheEntry(String host, String[] ips, long expiration)
Construct aDnsCacheEntry
.DnsCacheEntry(String host, String[] ips, Date expiration)
Deprecated.useDnsCacheEntry(String, String[], long)
instead
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Date
getExpiration()
get the expiration of DNS cache entry(DNS record).String
getHost()
get host name/domain name of DNS cache entry(DNS record).String
getIp()
get the first ip ofgetIps()
String[]
getIps()
get ips of DNS cache entry(DNS record).int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
DnsCacheEntry
@Deprecated public DnsCacheEntry(String host, String[] ips, Date expiration)
Deprecated.useDnsCacheEntry(String, String[], long)
insteadConstruct aDnsCacheEntry
.
-
DnsCacheEntry
public DnsCacheEntry(String host, String[] ips, long expiration)
Construct aDnsCacheEntry
.- Since:
- 1.6.0
-
-
Method Detail
-
getHost
public String getHost()
get host name/domain name of DNS cache entry(DNS record).
-
getIps
public String[] getIps()
get ips of DNS cache entry(DNS record).
-
getExpiration
public Date getExpiration()
get the expiration of DNS cache entry(DNS record).return value
Long.MAX_VALUE
means "never expiration".
-
-