Record Class GraphNode
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.resilience.GraphNode
- Record Components:
id- stable id, unique in the graph (for examplemetro:DC,onramp:aws@DC)kind- what the node stands forlabel- readable namemetro- the metro code the node is located in (metros, routers, on-ramps), ornullregion- the Equinix region ofmetro, ornullwhen unknown or not locatedcloudId- the spec cloud id (on-ramps and clouds), ornullgeoZones- the metro's Fabric geo scopes / zones as the catalogue reports them (metros only); nevernullweight- a site's share of the total site weight (0..1);nullfor other nodesproviderRegion- for a cloud,PROVIDER regionwhen the spec names its region (clouds sharing it share fate);nullotherwise
-
Constructor Summary
ConstructorsConstructorDescriptionGraphNode(String id, NodeKind kind, String label, String metro, Region region, String cloudId, Set<String> geoZones, Double weight) A node with no provider region.GraphNode(String id, NodeKind kind, String label, String metro, Region region, String cloudId, Set<String> geoZones, Double weight, String providerRegion) Requires an id and a kind; makesgeoZonesimmutable, sorted and non-null. -
Method Summary
Modifier and TypeMethodDescriptioncloudId()Returns the value of thecloudIdrecord component.final booleanIndicates whether some other object is "equal to" this one.geoZones()Returns the value of thegeoZonesrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.kind()Returns the value of thekindrecord component.label()Returns the value of thelabelrecord component.metro()Returns the value of themetrorecord component.Returns the value of theproviderRegionrecord component.region()Returns the value of theregionrecord component.final StringtoString()Returns a string representation of this record class.weight()Returns the value of theweightrecord component.
-
Constructor Details
-
GraphNode
-
GraphNode
public GraphNode(String id, NodeKind kind, String label, String metro, Region region, String cloudId, Set<String> geoZones, Double weight) A node with no provider region.- Parameters:
id- the idkind- the kindlabel- the labelmetro- the metro code, ornullregion- the region, ornullcloudId- the cloud id, ornullgeoZones- the zones, ornullweight- the site weight, ornull
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
id
-
kind
-
label
-
metro
-
region
-
cloudId
-
geoZones
-
weight
-
providerRegion
Returns the value of theproviderRegionrecord component.- Returns:
- the value of the
providerRegionrecord component
-