Class HostBase
- All Implemented Interfaces:
Buildable
,UnsafeSerializable
,Serializable
,Cloneable
- Direct Known Subclasses:
Host
A host's TransferData
is stored on the superordinate domain. Non-subordinate hosts
don't carry a full set of TransferData; all they have is lastTransferTime.
This class deliberately does not include an Id
so that any
foreign-keyed fields can refer to the proper parent entity's ID, whether we're storing this in
the DB itself or as part of another entity
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
HostBase.Builder<T extends HostBase,
B extends HostBase.Builder<T, B>> A builder for constructingHostBase
, since it is immutable.Nested classes/interfaces inherited from class google.registry.model.EppResource
EppResource.BuilderWithTransferData<T extends TransferData,
B extends EppResource.BuilderWithTransferData<T, B>>, EppResource.ForeignKeyedEppResource, EppResource.ResourceWithTransferData<T extends TransferData> Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotHydrate, ImmutableObject.IgnoredInDiffableMap, ImmutableObject.Insignificant
Nested classes/interfaces inherited from interface google.registry.model.Buildable
Buildable.GenericBuilder<S,
B extends Buildable.GenericBuilder<?, ?>>, Buildable.Overlayable<T> -
Field Summary
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionHostBase.Builder
<? extends HostBase, ?> Override ofBuildable.asBuilder()
so that the extra methods are visible.cloneProjectedAtTime
(org.joda.time.DateTime now) Deprecated.org.joda.time.DateTime
computeLastTransferTime
(Domain superordinateDomain) Compute the correct last transfer time for this host given its loaded superordinate domain.Create the VKey for the specified EPP resource.Get the foreign key string for this resource.com.google.common.collect.ImmutableSet
<InetAddress> org.joda.time.DateTime
org.joda.time.DateTime
boolean
Methods inherited from class google.registry.model.EppResource
getCreationRegistrarId, getCreationTime, getDeletionTime, getLastEppUpdateRegistrarId, getLastEppUpdateTime, getPersistedCurrentSponsorRegistrarId, getRepoId, getStatusValues, loadCached, loadCached, setCacheForTest, setRepoId
Methods inherited from class google.registry.model.UpdateAutoTimestampEntity
copyUpdateTimestamp, getUpdateTimestamp, resetUpdateTimestamp, setUpdateTimestamp
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
Constructor Details
-
HostBase
public HostBase()
-
-
Method Details
-
getHostName
-
getSuperordinateDomain
-
isSubordinate
public boolean isSubordinate() -
getInetAddresses
-
getLastTransferTime
public org.joda.time.DateTime getLastTransferTime() -
getLastSuperordinateChange
public org.joda.time.DateTime getLastSuperordinateChange() -
getForeignKey
Description copied from class:EppResource
Get the foreign key string for this resource.- Specified by:
getForeignKey
in classEppResource
-
createVKey
Description copied from class:EppResource
Create the VKey for the specified EPP resource.- Specified by:
createVKey
in classEppResource
-
cloneProjectedAtTime
Deprecated.Description copied from class:EppResource
Return a clone of the resource with timed status values modified using the given time.- Specified by:
cloneProjectedAtTime
in classEppResource
-
asBuilder
Description copied from class:EppResource
Override ofBuildable.asBuilder()
so that the extra methods are visible.- Specified by:
asBuilder
in interfaceBuildable
- Specified by:
asBuilder
in classEppResource
-
computeLastTransferTime
Compute the correct last transfer time for this host given its loaded superordinate domain.Hosts can move between superordinate domains, so to know which lastTransferTime is correct we need to know if the host was attached to this superordinate the last time that the superordinate was transferred. If the last superordinate change was before this time, then the host was attached to this superordinate domain during that transfer.
If the host is not subordinate the domain can be null, and we just return last transfer time.
- Parameters:
superordinateDomain
- the loaded superordinate domain, which must match the key in thesuperordinateDomain
field. Passing it as a parameter allows the caller to control the degree of consistency used to load it.
-