Record Class Record
java.lang.Object
java.lang.Record
com.yahoo.vespa.hosted.controller.api.integration.dns.Record
- All Implemented Interfaces:
Comparable<Record>
public record Record(Record.Type type, Duration ttl, RecordName name, RecordData data)
extends Record
implements Comparable<Record>
A basic representation of a DNS resource record, containing the record type, name and data.
- Author:
- mpolden
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRecord(Record.Type type, RecordName name, RecordData data) Record(Record.Type type, Duration ttl, RecordName name, RecordData data) Creates an instance of aRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintdata()Data in this, e.g.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Name of this, e.g.toString()Returns a string representation of this record class.ttl()The TTL value of thistype()DNS type of this
-
Constructor Details
-
Record
Creates an instance of aRecordrecord class.- Parameters:
type- the value for thetyperecord componentttl- the value for thettlrecord componentname- the value for thenamerecord componentdata- the value for thedatarecord component
-
Record
-
-
Method Details
-
type
DNS type of this -
ttl
The TTL value of this -
data
Data in this, e.g. IP address for records of type A -
name
Name of this, e.g. a FQDN for records of type A -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
compareTo
- Specified by:
compareToin interfaceComparable<Record>
-
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object).
-