mirror of
https://github.com/google/nomulus
synced 2026-01-09 23:47:49 +00:00
Load foreign keys more efficiently for xml marshalling.
Before this CL, each contact and host was independently loaded via the ReferenceUnion adapter. Since fields are processed serially by JAXB, this means worst-case there were 17 loads, best case 3 (the 3 required contacts) and usual case 5-6 (some hosts). This CL reduces that to 1 datastore roundtrip in all cases. A side effect of this CL is the further hollowing-out of ReferenceUnion, since it no longer is involved in marshalling at all. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=123712842
This commit is contained in:
@@ -510,20 +510,6 @@ public class DomainCommand {
|
||||
}}));
|
||||
}
|
||||
|
||||
/**
|
||||
* EPP-inputable version of XML type for contact identifiers associated with a domain, which can
|
||||
* be converted to a storable (and EPP-outputable) {@link DesignatedContact}.
|
||||
*
|
||||
* @see "http://tools.ietf.org/html/rfc5731#section-2.2"
|
||||
*/
|
||||
static class ForeignKeyedDesignatedContact extends ImmutableObject {
|
||||
@XmlAttribute(required = true)
|
||||
DesignatedContact.Type type;
|
||||
|
||||
@XmlValue
|
||||
String contactId;
|
||||
}
|
||||
|
||||
/** Exception to throw when referenced objects don't exist. */
|
||||
public static class InvalidReferencesException extends Exception {
|
||||
private final ImmutableSet<String> foreignKeys;
|
||||
|
||||
Reference in New Issue
Block a user