Record Class DesignGraph
java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.resilience.DesignGraph
- Record Components:
specFingerprint- theDesignSpec.fingerprint()the graph was built fromspecName- the spec's nameportfolio- the portfolio key (for exampleDC+NY)nodes- every node, in a fixed order (by kind, then id)edges- every edge, in a fixed order (by kind, then id)placements- every workload's placement, in spec orderrequiredClouds- ids of the spec clouds marked requiredallowedZones- the spec'sconstraints.geoZones(upper case); empty when sovereignty is not constrainedsiteMaxLatencyMs- the spec'sconstraints.maxLatencyMs(site to its access metro), ornullassumptions- how the graph was built where the spec is silent (stated for the reader)
public record DesignGraph(String specFingerprint, String specName, String portfolio, List<GraphNode> nodes, List<GraphEdge> edges, List<PlacementView> placements, List<String> requiredClouds, List<String> allowedZones, Double siteMaxLatencyMs, List<String> assumptions)
extends Record
An explicit, immutable graph of one design: sites, metros, Cloud Routers, cloud on-ramps, clouds,
workloads and (optionally) peer networks, joined by access circuits, the inter-metro backbone,
primary and standby cloud connections, provider links and workload hosting, each with its capacity
and round-trip latency where known. Built by
DesignGraphBuilder; simulated by
FailureSimulator. Jackson-serialisable; toMermaid() draws it and
toTable() lists it.-
Constructor Summary
ConstructorsConstructorDescriptionDesignGraph(String specFingerprint, String specName, String portfolio, List<GraphNode> nodes, List<GraphEdge> edges, List<PlacementView> placements, List<String> requiredClouds, List<String> allowedZones, Double siteMaxLatencyMs, List<String> assumptions) Makes the lists immutable and rejects duplicate or dangling ids. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowedZonesrecord component.Returns the value of theassumptionsrecord component.edges()Returns the value of theedgesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.nodes()Returns the value of thenodesrecord component.Returns the value of theplacementsrecord component.Returns the value of theportfoliorecord component.Returns the value of therequiredCloudsrecord component.Returns the value of thesiteMaxLatencyMsrecord component.Returns the value of thespecFingerprintrecord component.specName()Returns the value of thespecNamerecord component.toJson()Draws the graph as a Mermaid flowchart: one subgraph per metro (its metro, Cloud Router and on-ramps), sites on the left, clouds on the right.final StringtoString()Returns a string representation of this record class.toTable()
-
Constructor Details
-
DesignGraph
public DesignGraph(String specFingerprint, String specName, String portfolio, List<GraphNode> nodes, List<GraphEdge> edges, List<PlacementView> placements, List<String> requiredClouds, List<String> allowedZones, Double siteMaxLatencyMs, List<String> assumptions) Makes the lists immutable and rejects duplicate or dangling ids.
-
-
Method Details
-
node
-
edge
-
nodes
-
edges
-
toMermaid
Draws the graph as a Mermaid flowchart: one subgraph per metro (its metro, Cloud Router and on-ramps), sites on the left, clouds on the right. Standby edges are dashed; edge labels carry capacity and round-trip latency where known.- Returns:
- Mermaid source (paste into a
mermaidfenced block)
-
toTable
- Returns:
- a Markdown table of every edge: kind, endpoints, role, capacity and round trip with its basis
-
toJson
- Returns:
- the graph as indented JSON
-
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). -
specFingerprint
Returns the value of thespecFingerprintrecord component.- Returns:
- the value of the
specFingerprintrecord component
-
specName
-
portfolio
-
nodes
-
edges
-
placements
Returns the value of theplacementsrecord component.- Returns:
- the value of the
placementsrecord component
-
requiredClouds
Returns the value of therequiredCloudsrecord component.- Returns:
- the value of the
requiredCloudsrecord component
-
allowedZones
Returns the value of theallowedZonesrecord component.- Returns:
- the value of the
allowedZonesrecord component
-
siteMaxLatencyMs
Returns the value of thesiteMaxLatencyMsrecord component.- Returns:
- the value of the
siteMaxLatencyMsrecord component
-
assumptions
Returns the value of theassumptionsrecord component.- Returns:
- the value of the
assumptionsrecord component
-