Package com.alibaba.dcm
Class DnsCacheEntry
- java.lang.Object
-
- com.alibaba.dcm.DnsCacheEntry
-
- All Implemented Interfaces:
Serializable
@Immutable 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 booleanequals(Object o)DategetExpiration()get the expiration of DNS cache entry(DNS record).StringgetHost()get host name/domain name of DNS cache entry(DNS record).StringgetIp()get the first ip ofgetIps()String[]getIps()get ips of DNS cache entry(DNS record).inthashCode()StringtoString()
-
-
-
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_VALUEmeans "never expiration".
-
-