Class ExcludedMetrosConstraint

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

public final class ExcludedMetrosConstraint extends Object implements Constraint
No metro in constraints.excludedMetros may be used. Prunes per metro.
  • Field Details

  • Constructor Details

    • ExcludedMetrosConstraint

      public ExcludedMetrosConstraint()
  • Method Details

    • id

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

      public boolean admits(MetroFacts metro, DesignContext context)
      Description copied from interface: Constraint
      Cheap per-metro pruning before portfolios are formed. Return false only when no portfolio containing this metro could ever satisfy the constraint (an excluded metro, a metro outside every allowed zone). The default admits every metro.
      Specified by:
      admits in interface Constraint
      Parameters:
      metro - a candidate metro
      context - the facts of this run
      Returns:
      whether the metro may appear in a portfolio
    • 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