mirror of
https://github.com/google/nomulus.git
synced 2025-04-29 19:47:51 +02:00
Add TTL configs to Registry object (#1968)
* Add TTL configs to Registry object * Change A and AAAA records TTL field name
This commit is contained in:
parent
d1676dfee9
commit
273a633847
2 changed files with 53 additions and 0 deletions
|
@ -275,6 +275,26 @@ public class Registry extends ImmutableObject implements Buildable, UnsafeSerial
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The time to live for DNS A and AAAA records.
|
||||
*
|
||||
* <p>When this field is null, the "dnsDefaultATtl" value from the config file will be used.
|
||||
*/
|
||||
Duration dnsAPlusAaaaTtl;
|
||||
|
||||
/**
|
||||
* The time to live for DNS NS records.
|
||||
*
|
||||
* <p>When this field is null, the "dnsDefaultNsTtl" value from the config file will be used.
|
||||
*/
|
||||
Duration dnsNsTtl;
|
||||
|
||||
/**
|
||||
* The time to live for DNS DS records.
|
||||
*
|
||||
* <p>When this field is null, the "dnsDefaultDsTtl" value from the config file will be used.
|
||||
*/
|
||||
Duration dnsDsTtl;
|
||||
/**
|
||||
* The unicode-aware representation of the TLD associated with this {@link Registry}.
|
||||
*
|
||||
|
@ -647,6 +667,21 @@ public class Registry extends ImmutableObject implements Buildable, UnsafeSerial
|
|||
return numDnsPublishLocks;
|
||||
}
|
||||
|
||||
/** Returns the time to live for A and AAAA records. */
|
||||
public Duration getDnsAPlusAaaaTtl() {
|
||||
return dnsAPlusAaaaTtl;
|
||||
}
|
||||
|
||||
/** Returns the time to live for NS records. */
|
||||
public Duration getDnsNsTtl() {
|
||||
return dnsNsTtl;
|
||||
}
|
||||
|
||||
/** Returns the time to live for DS records. */
|
||||
public Duration getDnsDsTtl() {
|
||||
return dnsDsTtl;
|
||||
}
|
||||
|
||||
public ImmutableSet<String> getAllowedRegistrantContactIds() {
|
||||
return nullToEmptyImmutableCopy(allowedRegistrantContactIds);
|
||||
}
|
||||
|
@ -737,6 +772,21 @@ public class Registry extends ImmutableObject implements Buildable, UnsafeSerial
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder setDnsAPlusAaaaTtl(Duration dnsAPlusAaaaTtl) {
|
||||
getInstance().dnsAPlusAaaaTtl = dnsAPlusAaaaTtl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDnsNsAtl(Duration dnsNsAtl) {
|
||||
getInstance().dnsNsTtl = dnsNsAtl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setDnsDsAtl(Duration dnsDsAtl) {
|
||||
getInstance().dnsDsTtl = dnsDsAtl;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAddGracePeriodLength(Duration addGracePeriodLength) {
|
||||
checkArgument(
|
||||
addGracePeriodLength.isLongerThan(Duration.ZERO),
|
||||
|
|
|
@ -716,6 +716,9 @@
|
|||
creation_time timestamptz not null,
|
||||
currency text not null,
|
||||
default_promo_tokens text[],
|
||||
dns_a_plus_aaaa_ttl interval,
|
||||
dns_ds_ttl interval,
|
||||
dns_ns_ttl interval,
|
||||
dns_paused boolean not null,
|
||||
dns_writers text[] not null,
|
||||
drive_folder_id text,
|
||||
|
|
Loading…
Add table
Reference in a new issue