Class MemoryNameService
java.lang.Object
com.yahoo.vespa.hosted.controller.api.integration.dns.MemoryNameService
- All Implemented Interfaces:
NameService
An in-memory name service for testing purposes.
- Author:
- mpolden
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateAlias(RecordName name, Set<AliasTarget> targets) Create a non-standard ALIAS record pointing to given targets.createDirect(RecordName name, Set<DirectTarget> targets) Create a non-standard record pointing to given targets.createRecord(Record.Type type, RecordName name, RecordData canonicalName) Create a new recordcreateTxtRecords(RecordName name, List<RecordData> txtData) Create a new TXT record containing the provided data.findRecords(Record.Type type, RecordData data) Find all records matching given type and datafindRecords(Record.Type type, RecordName name) Find all records matching given type and namerecords()voidremoveRecords(List<Record> records) Remove given record(s)voidupdateRecord(Record record, RecordData newData) Update existing record
-
Constructor Details
-
MemoryNameService
public MemoryNameService()
-
-
Method Details
-
records
-
add
-
createRecord
Description copied from interface:NameServiceCreate a new record- Specified by:
createRecordin interfaceNameService- Parameters:
type- The DNS type of record to make, only a small set of types are supported, check with the implementationname- Name of the record, e.g. a FQDN for records of type AcanonicalName- Data of the record, e.g. IP address for records of type A- Returns:
- The created record
-
createAlias
Description copied from interface:NameServiceCreate a non-standard ALIAS record pointing to given targets. Implementations of this are expected to be idempotent- Specified by:
createAliasin interfaceNameServicetargets- Targets that should be resolved by this name.- Returns:
- The created records. One per target.
-
createDirect
Description copied from interface:NameServiceCreate a non-standard record pointing to given targets. Implementations of this are expected to be idempotent- Specified by:
createDirectin interfaceNameServicetargets- Targets that should be resolved by this name.- Returns:
- The created records. One per target.
-
createTxtRecords
Description copied from interface:NameServiceCreate a new TXT record containing the provided data.- Specified by:
createTxtRecordsin interfaceNameService- Parameters:
name- Name of the created recordtxtData- TXT data values for the record, each consisting of one or more space-separated double-quoted strings: "string1" "string2"- Returns:
- The created records
-
findRecords
Description copied from interface:NameServiceFind all records matching given type and name- Specified by:
findRecordsin interfaceNameService
-
findRecords
Description copied from interface:NameServiceFind all records matching given type and data- Specified by:
findRecordsin interfaceNameService
-
updateRecord
Description copied from interface:NameServiceUpdate existing record- Specified by:
updateRecordin interfaceNameService
-
removeRecords
Description copied from interface:NameServiceRemove given record(s)- Specified by:
removeRecordsin interfaceNameService
-