Record Class PlacementView

java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.resilience.PlacementView
Record Components:
workload - the workload label (or cloud:<id> for a cloud no workload names)
primary - metro code it runs in, or null when it could not be placed
standby - metro code it fails over to, or null for none
clouds - spec cloud ids it must reach
bandwidthMbps - its demand in Mbps, or null when unsized (no capacity check is possible)
maxLatencyMs - its round-trip limit from every site, or null
cloudOnly - true for the placement made for a cloud no workload names

public record PlacementView(String workload, String primary, String standby, List<String> clouds, Integer bandwidthMbps, Double maxLatencyMs, boolean cloudOnly) extends Record
A workload as the graph sees it: where it runs, where it fails over to and what it needs. Copied from the PlacementPlan so a graph is self-contained.
  • Constructor Details

    • PlacementView

      public PlacementView(String workload, String primary, String standby, List<String> clouds, Integer bandwidthMbps, Double maxLatencyMs, boolean cloudOnly)
      Makes clouds immutable and non-null.
  • Method Details

    • nodeId

      public String nodeId()
      Returns:
      the graph node id of this workload
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • workload

      public String workload()
      Returns the value of the workload record component.
      Returns:
      the value of the workload record component
    • primary

      public String primary()
      Returns the value of the primary record component.
      Returns:
      the value of the primary record component
    • standby

      public String standby()
      Returns the value of the standby record component.
      Returns:
      the value of the standby record component
    • clouds

      public List<String> clouds()
      Returns the value of the clouds record component.
      Returns:
      the value of the clouds record component
    • bandwidthMbps

      public Integer bandwidthMbps()
      Returns the value of the bandwidthMbps record component.
      Returns:
      the value of the bandwidthMbps record component
    • maxLatencyMs

      public Double maxLatencyMs()
      Returns the value of the maxLatencyMs record component.
      Returns:
      the value of the maxLatencyMs record component
    • cloudOnly

      public boolean cloudOnly()
      Returns the value of the cloudOnly record component.
      Returns:
      the value of the cloudOnly record component