Record Class SiteIntent

java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.spec.SiteIntent
Record Components:
label - unique name within the spec, used in every result that refers to the site
metro - nearest Equinix metro code, or null
latitude - decimal degrees, or null
longitude - decimal degrees, or null
role - what the site is, which sets its default importance; may be null
headcount - people at the site, used as its weight when weight is unset; may be null
weight - explicit relative importance (positive); overrides headcount and role; may be null

public record SiteIntent(String label, String metro, Double latitude, Double longitude, SiteRole role, Integer headcount, Double weight) extends Record
A place the design must serve: an office, a user population, a factory or an existing data centre. Give either metro (an Equinix metro code such as "LD") or latitude + longitude; with neither, latency to the site is unknown and the site is left out of latency scoring and latency limits.
  • Constructor Details

    • SiteIntent

      public SiteIntent(String label, String metro, Double latitude, Double longitude, SiteRole role, Integer headcount, Double weight)
      Creates an instance of a SiteIntent record class.
      Parameters:
      label - the value for the label record component
      metro - the value for the metro record component
      latitude - the value for the latitude record component
      longitude - the value for the longitude record component
      role - the value for the role record component
      headcount - the value for the headcount record component
      weight - the value for the weight record component
  • Method Details

    • hasCoordinates

      public boolean hasCoordinates()
      Returns:
      true when the site carries both coordinates
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • metro

      public String metro()
      Returns the value of the metro record component.
      Returns:
      the value of the metro record component
    • latitude

      public Double latitude()
      Returns the value of the latitude record component.
      Returns:
      the value of the latitude record component
    • longitude

      public Double longitude()
      Returns the value of the longitude record component.
      Returns:
      the value of the longitude record component
    • role

      public SiteRole role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component
    • headcount

      public Integer headcount()
      Returns the value of the headcount record component.
      Returns:
      the value of the headcount record component
    • weight

      public Double weight()
      Returns the value of the weight record component.
      Returns:
      the value of the weight record component