Class ExcludedMetrosConstraint
java.lang.Object
com.eqixiac.equinix.design.constraint.ExcludedMetrosConstraint
- All Implemented Interfaces:
Constraint
No metro in
constraints.excludedMetros may be used. Prunes per metro.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadmits(MetroFacts metro, DesignContext context) Cheap per-metro pruning before portfolios are formed.check(MetroPortfolio portfolio, DesignContext context) Checks a whole portfolio.id()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Constraint
usesCostModifier and TypeMethodDescriptiondefault booleanusesCost()WhetherConstraint.check(MetroPortfolio, DesignContext)prices the portfolio throughDesignContext.costModel().
-
Field Details
-
ID
-
-
Constructor Details
-
ExcludedMetrosConstraint
public ExcludedMetrosConstraint()
-
-
Method Details
-
id
- Specified by:
idin interfaceConstraint- Returns:
- a stable id, lower_snake_case (for example
max_latency)
-
admits
Description copied from interface:ConstraintCheap per-metro pruning before portfolios are formed. Returnfalseonly 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:
admitsin interfaceConstraint- Parameters:
metro- a candidate metrocontext- the facts of this run- Returns:
- whether the metro may appear in a portfolio
-
check
Description copied from interface:ConstraintChecks a whole portfolio.- Specified by:
checkin interfaceConstraint- Parameters:
portfolio- the candidate designcontext- the facts of this run- Returns:
- the verdict with its reason
-