Record Class PlacementPlan

java.lang.Object
java.lang.Record
com.eqixiac.equinix.design.placement.PlacementPlan
Record Components:
portfolio - the metros placed on
placements - one entry per workload, in spec order, then one per cloud no workload refers to
legs - one entry per (metro, cloud) pair the placements need, sorted by metro then cloud

public record PlacementPlan(MetroPortfolio portfolio, List<PlacementPlan.Placement> placements, List<PlacementPlan.CloudLeg> legs) extends Record
Where every workload of a spec runs on one portfolio, and the cloud connections that implies. Produced by WorkloadPlacer; consumed by the cost model (what to price in each metro), the resilience objective, the workload constraints and the Deployment Wizard.
  • Constructor Details

  • Method Details

    • placement

      public Optional<PlacementPlan.Placement> placement(String label)
      Parameters:
      label - a workload label
      Returns:
      its placement
    • legsIn

      public List<PlacementPlan.CloudLeg> legsIn(MetroId metro)
      Parameters:
      metro - a metro
      Returns:
      the cloud legs in that metro
    • idleMetros

      public Set<MetroId> idleMetros()
      Returns:
      the portfolio metros that carry no placement (primary or standby) and no cloud leg
    • 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.
    • portfolio

      public MetroPortfolio portfolio()
      Returns the value of the portfolio record component.
      Returns:
      the value of the portfolio record component
    • placements

      public List<PlacementPlan.Placement> placements()
      Returns the value of the placements record component.
      Returns:
      the value of the placements record component
    • legs

      public List<PlacementPlan.CloudLeg> legs()
      Returns the value of the legs record component.
      Returns:
      the value of the legs record component