Class MetroCountConstraint

java.lang.Object
com.eqixiac.equinix.design.constraint.MetroCountConstraint
All Implemented Interfaces:
Constraint

public final class MetroCountConstraint extends Object implements Constraint
constraints.minMetros and constraints.maxMetros. The solver already searches only that size range; the constraint makes the limit visible in every verdict and in binding-constraint analysis.
  • Field Details

  • Constructor Details

    • MetroCountConstraint

      public MetroCountConstraint()
  • Method Details

    • id

      public String id()
      Specified by:
      id in interface Constraint
      Returns:
      a stable id, lower_snake_case (for example max_latency)
    • check

      public ConstraintVerdict check(MetroPortfolio portfolio, DesignContext context)
      Description copied from interface: Constraint
      Checks a whole portfolio.
      Specified by:
      check in interface Constraint
      Parameters:
      portfolio - the candidate design
      context - the facts of this run
      Returns:
      the verdict with its reason