Remove "Datastore" from comments when using both DBs (#1310)

* Change datastore references in comments to be more generic

* Update flows doc
This commit is contained in:
sarahcaseybot 2021-09-13 18:02:41 -04:00 committed by GitHub
parent 0fe2e6c976
commit d282c35c64
11 changed files with 40 additions and 39 deletions

View file

@ -31,12 +31,12 @@ package google.registry.dns.writer;
public interface DnsWriter { public interface DnsWriter {
/** /**
* Loads {@code domainName} from Datastore and publishes its NS/DS records to the DNS server. * Loads {@code domainName} from the database and publishes its NS/DS records to the DNS server.
* Replaces existing records for the exact name supplied with an NS record for each name server * Replaces existing records for the exact name supplied with an NS record for each name server
* and a DS record for each delegation signer stored in the registry for the supplied domain name. * and a DS record for each delegation signer stored in the registry for the supplied domain name.
* If the domain is deleted or is in a "non-publish" state then any existing records are deleted. * If the domain is deleted or is in a "non-publish" state then any existing records are deleted.
* *
* This must NOT actually perform any action, instead it should stage the action so that it's * <p>This must NOT actually perform any action, instead it should stage the action so that it's
* performed when {@link #commit()} is called. * performed when {@link #commit()} is called.
* *
* @param domainName the fully qualified domain name, with no trailing dot * @param domainName the fully qualified domain name, with no trailing dot
@ -44,14 +44,14 @@ public interface DnsWriter {
void publishDomain(String domainName); void publishDomain(String domainName);
/** /**
* Loads {@code hostName} from Datastore and publishes its A/AAAA glue records to the DNS server, * Loads {@code hostName} from the database and publishes its A/AAAA glue records to the DNS
* if it is used as an in-bailiwick nameserver. Orphaned glue records are prohibited. Replaces * server, if it is used as an in-bailiwick nameserver. Orphaned glue records are prohibited.
* existing records for the exact name supplied, with an A or AAAA record (as appropriate) for * Replaces existing records for the exact name supplied, with an A or AAAA record (as
* each address stored in the registry, for the supplied host name. If the host is deleted then * appropriate) for each address stored in the registry, for the supplied host name. If the host
* the existing records are deleted. Assumes that this method will only be called for in-bailiwick * is deleted then the existing records are deleted. Assumes that this method will only be called
* hosts. The registry does not have addresses for other hosts. * for in-bailiwick hosts. The registry does not have addresses for other hosts.
* *
* This must NOT actually perform any action, instead it should stage the action so that it's * <p>This must NOT actually perform any action, instead it should stage the action so that it's
* performed when {@link #commit()} is called. * performed when {@link #commit()} is called.
* *
* @param hostName the fully qualified host name, with no trailing dot * @param hostName the fully qualified host name, with no trailing dot

View file

@ -150,7 +150,8 @@ public final class SyncGroupMembersAction implements Runnable {
/** /**
* Parses the results from Google Groups for each registrar, setting the dirty flag to false in * Parses the results from Google Groups for each registrar, setting the dirty flag to false in
* Datastore for the calls that succeeded and accumulating the errors for the calls that failed. * the database for the calls that succeeded and accumulating the errors for the calls that
* failed.
*/ */
private static List<Throwable> getErrorsAndUpdateFlagsForSuccesses( private static List<Throwable> getErrorsAndUpdateFlagsForSuccesses(
ImmutableMap<Registrar, Optional<Throwable>> results) { ImmutableMap<Registrar, Optional<Throwable>> results) {

View file

@ -47,7 +47,7 @@ import javax.inject.Inject;
import org.joda.time.DateTime; import org.joda.time.DateTime;
/** /**
* Class for synchronizing all {@link Registrar} Datastore objects to a Google Spreadsheet. * Class for synchronizing all {@link Registrar} objects to a Google Spreadsheet.
* *
* @see SyncRegistrarsSheetAction * @see SyncRegistrarsSheetAction
*/ */

View file

@ -56,10 +56,10 @@ public class DomainCreateFlowCustomLogic extends BaseFlowCustomLogic {
/** /**
* A hook that runs before new entities are persisted, allowing them to be changed. * A hook that runs before new entities are persisted, allowing them to be changed.
* *
* <p>It returns the actual entity changes that should be persisted to Datastore. It is important * <p>It returns the actual entity changes that should be persisted to the database. It is
* to be careful when changing the flow behavior for existing entities, because the core logic * important to be careful when changing the flow behavior for existing entities, because the core
* across many different flows expects the existence of these entities and many of the fields on * logic across many different flows expects the existence of these entities and many of the
* them. * fields on them.
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public EntityChanges beforeSave(BeforeSaveParameters parameters) throws EppException { public EntityChanges beforeSave(BeforeSaveParameters parameters) throws EppException {

View file

@ -54,10 +54,10 @@ public class DomainDeleteFlowCustomLogic extends BaseFlowCustomLogic {
/** /**
* A hook that runs before new entities are persisted, allowing them to be changed. * A hook that runs before new entities are persisted, allowing them to be changed.
* *
* <p>It returns the actual entity changes that should be persisted to Datastore. It is important * <p>It returns the actual entity changes that should be persisted to the database. It is
* to be careful when changing the flow behavior for existing entities, because the core logic * important to be careful when changing the flow behavior for existing entities, because the core
* across many different flows expects the existence of these entities and many of the fields on * logic across many different flows expects the existence of these entities and many of the
* them. * fields on them.
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public EntityChanges beforeSave(BeforeSaveParameters parameters) throws EppException { public EntityChanges beforeSave(BeforeSaveParameters parameters) throws EppException {

View file

@ -55,10 +55,10 @@ public class DomainRenewFlowCustomLogic extends BaseFlowCustomLogic {
/** /**
* A hook that runs before new entities are persisted, allowing them to be changed. * A hook that runs before new entities are persisted, allowing them to be changed.
* *
* <p>It returns the actual entity changes that should be persisted to Datastore. It is important * <p>It returns the actual entity changes that should be persisted to the database. It is
* to be careful when changing the flow behavior for existing entities, because the core logic * important to be careful when changing the flow behavior for existing entities, because the core
* across many different flows expects the existence of these entities and many of the fields on * logic across many different flows expects the existence of these entities and many of the
* them. * fields on them.
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public EntityChanges beforeSave(BeforeSaveParameters parameters) throws EppException { public EntityChanges beforeSave(BeforeSaveParameters parameters) throws EppException {

View file

@ -51,10 +51,10 @@ public class DomainUpdateFlowCustomLogic extends BaseFlowCustomLogic {
/** /**
* A hook that runs before new entities are persisted, allowing them to be changed. * A hook that runs before new entities are persisted, allowing them to be changed.
* *
* <p>It returns the actual entity changes that should be persisted to Datastore. It is important * <p>It returns the actual entity changes that should be persisted to the database. It is
* to be careful when changing the flow behavior for existing entities, because the core logic * important to be careful when changing the flow behavior for existing entities, because the core
* across many different flows expects the existence of these entities and many of the fields on * logic across many different flows expects the existence of these entities and many of the
* them. * fields on them.
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public EntityChanges beforeSave(BeforeSaveParameters parameters) throws EppException { public EntityChanges beforeSave(BeforeSaveParameters parameters) throws EppException {

View file

@ -19,7 +19,7 @@ import com.google.common.collect.ImmutableSet;
import google.registry.model.ImmutableObject; import google.registry.model.ImmutableObject;
import google.registry.persistence.VKey; import google.registry.persistence.VKey;
/** A wrapper class that encapsulates Datastore entities to both save and delete. */ /** A wrapper class that encapsulates database entities to both save and delete. */
@AutoValue @AutoValue
public abstract class EntityChanges { public abstract class EntityChanges {

View file

@ -149,7 +149,7 @@ public class AllocationTokenFlowUtils {
private AllocationToken loadToken(String token) throws EppException { private AllocationToken loadToken(String token) throws EppException {
if (Strings.isNullOrEmpty(token)) { if (Strings.isNullOrEmpty(token)) {
// We load the token directly from the input XML. If it's null or empty we should throw // We load the token directly from the input XML. If it's null or empty we should throw
// an InvalidAllocationTokenException before the Datastore load attempt fails. // an InvalidAllocationTokenException before the database load attempt fails.
// See https://tools.ietf.org/html/draft-ietf-regext-allocation-token-04#section-2.1 // See https://tools.ietf.org/html/draft-ietf-regext-allocation-token-04#section-2.1
throw new InvalidAllocationTokenException(); throw new InvalidAllocationTokenException();
} }

View file

@ -39,11 +39,11 @@ import org.joda.time.DateTime;
/** /**
* An EPP flow for requesting {@link PollMessage}s. * An EPP flow for requesting {@link PollMessage}s.
* *
* <p>This flow uses an eventually consistent Datastore query to return the oldest poll message for * <p>This flow uses an eventually consistent query to return the oldest poll message for the
* the registrar, as well as the total number of pending messages. Note that poll messages whose * registrar, as well as the total number of pending messages. Note that poll messages whose event
* event time is in the future (i.e. they are speculative and could still be changed or rescinded) * time is in the future (i.e. they are speculative and could still be changed or rescinded) are
* are ignored. The externally visible id for the poll message that the registrar sees is generated * ignored. The externally visible id for the poll message that the registrar sees is generated by
* by {@link PollMessageExternalKeyConverter}. * {@link PollMessageExternalKeyConverter}.
* *
* @error {@link PollRequestFlow.UnexpectedMessageIdException} * @error {@link PollRequestFlow.UnexpectedMessageIdException}
*/ */

View file

@ -972,11 +972,11 @@ as read, and won't be delivered again until the next year of their recurrence.
An EPP flow for requesting {@link PollMessage}s. An EPP flow for requesting {@link PollMessage}s.
This flow uses an eventually consistent Datastore query to return the oldest This flow uses an eventually consistent query to return the oldest poll message
poll message for the registrar, as well as the total number of pending messages. for the registrar, as well as the total number of pending messages. Note that
Note that poll messages whose event time is in the future (i.e. they are poll messages whose event time is in the future (i.e. they are speculative and
speculative and could still be changed or rescinded) are ignored. The externally could still be changed or rescinded) are ignored. The externally visible id for
visible id for the poll message that the registrar sees is generated by {@link the poll message that the registrar sees is generated by {@link
PollMessageExternalKeyConverter}. PollMessageExternalKeyConverter}.
### Errors ### Errors