public abstract class DNSRecord extends DNSEntry
| 限定符和类型 | 类和说明 |
|---|---|
static class |
DNSRecord.Address
Address record.
|
static class |
DNSRecord.HostInformation |
static class |
DNSRecord.IPv4Address |
static class |
DNSRecord.IPv6Address |
static class |
DNSRecord.Pointer
Pointer record.
|
static class |
DNSRecord.Service
Service record.
|
static class |
DNSRecord.Text |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(java.lang.Object other) |
long |
getCreated() |
java.net.InetAddress |
getRecordSource() |
abstract ServiceEvent |
getServiceEvent(JmDNSImpl dns)
Creates and return a service event for this record.
|
ServiceInfo |
getServiceInfo()
Return a service information associated with that record if appropriate.
|
abstract ServiceInfo |
getServiceInfo(boolean persistent)
Return a service information associated with that record if appropriate.
|
int |
getTTL() |
void |
incrementRefreshPercentage() |
boolean |
isExpired(long now)
Check if the record is expired.
|
abstract boolean |
isSingleValued()
Determine if a record can have multiple values in the cache.
|
boolean |
isStale(long now)
Check if the record is stale, i.e. it has outlived more than half of its TTL.
|
boolean |
isStaleAndShouldBeRefreshed(long now)
Check if the record is stale and whether the record should be refreshed over the network.
|
void |
setRecordSource(java.net.InetAddress source) |
void |
setTTL(int ttl) |
protected void |
toString(java.lang.StringBuilder sb) |
compareTo, getKey, getName, getQualifiedNameMap, getRecordClass, getRecordType, getSubtype, getType, hashCode, isDomainDiscoveryQuery, isReverseLookup, isSameEntry, isSameRecordClass, isSameType, isServicesDiscoveryMetaQuery, isUnique, isV4ReverseLookup, isV6ReverseLookup, matchRecordClass, matchRecordType, sameSubtype, toByteArray, toByteArray, toStringpublic boolean isExpired(long now)
DNSEntrypublic boolean isStale(long now)
DNSEntrypublic boolean isStaleAndShouldBeRefreshed(long now)
now - update datetrue is the record is stale and should be refreshed, false otherwise.public void incrementRefreshPercentage()
public abstract boolean isSingleValued()
false if this record can have multiple values in the cache, true otherwise.public ServiceInfo getServiceInfo()
public abstract ServiceInfo getServiceInfo(boolean persistent)
persistent - if true ServiceListener.resolveService will be called whenever new new information is received.public abstract ServiceEvent getServiceEvent(JmDNSImpl dns)
dns - DNS serviced by this eventpublic void setRecordSource(java.net.InetAddress source)
public java.net.InetAddress getRecordSource()
public void setTTL(int ttl)
public int getTTL()
public long getCreated()